in reply to Re: Re: Re: Re: Re: Run your own perlmonks!
in thread Run your own perlmonks!

Aye. However, in this purticular case, we could run the opcode (if any), and it could signal somehow "print exactly this content, with no header (because I've included the header), and stop processing after the opcode stage, and before the node stage".

Thanks very much for replying to this, and please, keep doing it -- even if you don't look at the Everything code ever (and it's not really that scary), you're giving me good ideas.

In purticular, currently, opcodes are expected to have a return value that is a bool -- handled, or not handled. We could extend this to say that if they return a scalar ref, then we print that out to the client, and stop processing.

That doesn't give us chunking, but it does mean that some opcodes can avoid having to rerender the page, at least under some curcimstances, with signifiant savings.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

  • Comment on Re: Re: Re: Re: Re: Re: Run your own perlmonks!

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Run your own perlmonks!
by liz (Monsignor) on Sep 30, 2003 at 09:26 UTC
    ...it's not really that scary...

    It's not that I'm afraid of the code. I'm afraid I'll be spending more time on it than I should. Time I should be spending on other things ;-)

    ...That doesn't give us chunking...

    Would you need chunking on sending back just a header? Or do you need that for the Keep-Alive? A Content-Length: 0 should be sufficient to keep the connection. should it not?

    Liz

      I see what you mean WRT being afraid of it -- it can be a bit addicting. I'm a bit addicted right now.

      I didn't mean on a HTTP level -- Apache will handle that for us (I think). Currently, Everything renderes out the entire content it's planning on sending out in memory, then outputs it in one go. This means that the client has to wait for the entire page to be rendered on the server before the user can see anything -- even that the server has recived their query. Unfornatly, I don't see a clean way of fixing that. (That isn't to say that there isn't one -- I just don't see it at present.)


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).