librelist archives

« back to archive

hot reloading added to proton

hot reloading added to proton

From:
Tom Yandell
Date:
2011-07-02 @ 13:56
As of 0.3.0 proton now has support for hot code reloading via the -r flag
:-)

Re: [nug] hot reloading added to proton

From:
Richard Hodgson
Date:
2011-07-03 @ 10:25
Very cool. Will update the usenode docs. 

Does it always reload everything or does it check last modified?

Richard

On 2 Jul 2011, at 14:56, Tom Yandell <tom@yandell.me.uk> wrote:

> As of 0.3.0 proton now has support for hot code reloading via the -r flag :-)

Re: [nug] hot reloading added to proton

From:
Tom Yandell
Date:
2011-07-07 @ 08:43
New in 0.5.0 - fork:

http://nodejs.org/docs/v0.5.0/api/child_processes.html#child_process.fork

Should make things simpler :-)


On 3 July 2011 16:06, Tom Yandell <tom@yandell.me.uk> wrote:

> Just finished making it handle multiple connections within a short window,
> which speeds it up a bit. Latency (for localhost) goes up from ~10ms without
> to ~150ms with for the initial page load. The time it takes to load the
> assets after the page comes back is back down to roughly what it was before
> with this change, which makes it a bit smoother.
>
> Will watch out for the pipe() thing - probably not allowing something to be
> collected properly by leaving an event handler in place.
>
> Tom
>
>
> On 3 July 2011 15:15, Richard Hodgson <rightaboutnow@gmail.com> wrote:
>
>> Haha, I think you did reply - bloody Yandell ;-)
>>
>> I got a "pipe() too many files" error on the console but I have no
>> idea when it was generated, was cycling through screen tabs at the
>> time.
>>
>> It works pretty well, as it loads everything including spv files.
>>
>> Richard.
>>
>> On 3 July 2011 15:01, tom@yandell.me.uk <tom@yandell.me.uk> wrote:
>> > It loads everything for each connection. There is a timeout on the keep
>> > alive of two seconds, so it doesn't make the static asset serving go too
>> > slow. Could probably make newly spawned child handle a number of
>> connections
>> > within a short time without any appreciable difference (other than the
>> > reduced latency). Pretty chuffed with it - had some Clifford++ code
>> which
>> > made it easier.
>> >
>> > Tom
>> >
>> >
>> > Sent from my HTC
>> >
>> > ----- Reply message -----
>> > From: "Richard Hodgson" <rightaboutnow@gmail.com>
>> > Date: Sun, Jul 3, 2011 11:25
>> > Subject: [nug] hot reloading added to proton
>> > To: <nug@librelist.com>
>> >
>> > Very cool. Will update the usenode docs.
>> >
>> > Does it always reload everything or does it check last modified?
>> >
>> > Richard
>> >
>> > On 2 Jul 2011, at 14:56, Tom Yandell <tom@yandell.me.uk> wrote:
>> >
>> >> As of 0.3.0 proton now has support for hot code reloading via the -r
>> flag
>> >> :-)
>> >
>> >
>> >
>>
>
>

Re: [nug] hot reloading added to proton

From:
Richard Hodgson
Date:
2011-07-07 @ 11:49
Can you feature detect for it or would you depend on nodejs 0.5.0 minimum?

Richard

On 7 July 2011 09:43, Tom Yandell <tom@yandell.me.uk> wrote:
> New in 0.5.0 - fork:
> http://nodejs.org/docs/v0.5.0/api/child_processes.html#child_process.fork
> Should make things simpler :-)
>
> On 3 July 2011 16:06, Tom Yandell <tom@yandell.me.uk> wrote:
>>
>> Just finished making it handle multiple connections within a short window,
>> which speeds it up a bit. Latency (for localhost) goes up from ~10ms without
>> to ~150ms with for the initial page load. The time it takes to load the
>> assets after the page comes back is back down to roughly what it was before
>> with this change, which makes it a bit smoother.
>> Will watch out for the pipe() thing - probably not allowing something to
>> be collected properly by leaving an event handler in place.
>> Tom
>>
>> On 3 July 2011 15:15, Richard Hodgson <rightaboutnow@gmail.com> wrote:
>>>
>>> Haha, I think you did reply - bloody Yandell ;-)
>>>
>>> I got a "pipe() too many files" error on the console but I have no
>>> idea when it was generated, was cycling through screen tabs at the
>>> time.
>>>
>>> It works pretty well, as it loads everything including spv files.
>>>
>>> Richard.
>>>
>>> On 3 July 2011 15:01, tom@yandell.me.uk <tom@yandell.me.uk> wrote:
>>> > It loads everything for each connection. There is a timeout on the keep
>>> > alive of two seconds, so it doesn't make the static asset serving go
>>> > too
>>> > slow. Could probably make newly spawned child handle a number of
>>> > connections
>>> > within a short time without any appreciable difference (other than the
>>> > reduced latency). Pretty chuffed with it - had some Clifford++ code
>>> > which
>>> > made it easier.
>>> >
>>> > Tom
>>> >
>>> >
>>> > Sent from my HTC
>>> >
>>> > ----- Reply message -----
>>> > From: "Richard Hodgson" <rightaboutnow@gmail.com>
>>> > Date: Sun, Jul 3, 2011 11:25
>>> > Subject: [nug] hot reloading added to proton
>>> > To: <nug@librelist.com>
>>> >
>>> > Very cool. Will update the usenode docs.
>>> >
>>> > Does it always reload everything or does it check last modified?
>>> >
>>> > Richard
>>> >
>>> > On 2 Jul 2011, at 14:56, Tom Yandell <tom@yandell.me.uk> wrote:
>>> >
>>> >> As of 0.3.0 proton now has support for hot code reloading via the -r
>>> >> flag
>>> >> :-)
>>> >
>>> >
>>> >
>>
>
>

Re: [nug] hot reloading added to proton

From:
Tom Yandell
Date:
2011-07-03 @ 13:45
Hmmm, thought i'd replied already, bloody phone :-(

It spawns a new process for each connection. It can process multiple
requests without reloading via keep-alive and has a short (2 second) timeout
between requests to ensure that this only happens for a single page view.
Should be possible to have the new process handle a number of connections
initiated a short time after the first, which should take a little latency
out.

Tom

On 3 July 2011 11:25, Richard Hodgson <rightaboutnow@gmail.com> wrote:

> Very cool. Will update the usenode docs.
>
> Does it always reload everything or does it check last modified?
>
> Richard
>
> On 2 Jul 2011, at 14:56, Tom Yandell <tom@yandell.me.uk> wrote:
>
> > As of 0.3.0 proton now has support for hot code reloading via the -r flag
> :-)
>