[freenet-dev] Asynchronous image loading

2009-06-19 Thread Matthew Toseland
On Friday 19 June 2009 16:18:12 sashee wrote:
> No, even javascript cannot send tab closing callback that is reliable.
> It can only be achieved with keepalives missing.
> Think about system crash when no action can be performed. On that case
> the javascript cannot report that it is closed, so it is not reliable.

Sure, we do need keepalives. But can javascript generate an unreliable report 
that the tab has been closed, that still happens most of the time, and is more 
or less instant, and if the browser crashes we will have to wait for the 
keepalive timeout?
> 
> sashee
> 
> On Fri, Jun 19, 2009 at 5:13 PM, Matthew
> Toseland wrote:
> > On Friday 19 June 2009 14:48:11 sashee wrote:
> >> Ofc not. HTTP is stateless, so in standard ways it cannot be notified
> >> when a tab is closed.
> >
> > Yes I mean with javascript?
> >>
> >> On Fri, Jun 19, 2009 at 12:28 AM, Matthew
> >> Toseland wrote:
> >> > On Thursday 18 June 2009 17:02:06 sashee wrote:
> >> >> With async image loading,activelinks will be loaded too.
> >> >> As for the 21 secs. It can be decreased, but only to sacrifice
> >> >> something else. 21 sec means the client can skip a keepalive, and fail
> >> >> after the second. Since it's localhost, it's unlikely to fail even 1,
> >> >> so it can be reduced to 11 sec. If we send keepalives more frequently,
> >> >> it will consume more resources for all tabs to send them, but it will
> >> >> reduce further the time needed to detect tab closes. It is easily
> >> >> configured with constants though.
> >> >
> >> > There is no callback on a page being closed?
> >> >>
> >> >> sashee
> >> >>
> >> >> On Thu, Jun 18, 2009 at 11:33 AM, xor wrote:
> >> >> > On Wednesday 17 June 2009 16:36:26 sashee wrote:
> >> >> >> Hello folks!
> >> >> >>
> >> >> >> Some days ago, I've talked with nextgens about toadlet
> >> >> >> continuations(it's asynchronous request processing), and he had a
> >> >> >> point that when the user opens a site with lots of images, then it
> >> >> >> needs many connections open for a long time, and it spawns many
> >> >> >> threads at serverside, which is resource demanding and some OSes 
> >> >> >> don't
> >> >> >> allow. The browser has a maximum connection limit to the site, but 
> >> >> >> the
> >> >> >> user can overwrite it. But at the default, firefox opens only 2-3
> >> >> >> connections to fetch the images, this way freenet don't start all the
> >> >> >> fetching, just what is requested. So one problem is that if a user
> >> >> >> alters the browser's config, then it will result many threads, if 
> >> >> >> not,
> >> >> >> then freenet can't download all the content simultanously.
> >> >> >> I think with pushing, I'm working on, can be a solution for both
> >> >> >> problems. When the page loads, freenet start fetching all the images,
> >> >> >> and the browser gets the progress with 1 permanent connection. There
> >> >> >> can be an image eg. "Image is loading...10%" and after some progress
> >> >> >> change to 20% and so on, and when finishes downloading, it shows or
> >> >> >> says eg. "Image finished loading, click to display". If it's done, we
> >> >> >> don't need continuations anymore. Ofc it would need javascript to be
> >> >> >> enabled.
> >> >> >>
> >> >> >> What you think?
> >> >> >
> >> >> > I filed a bug on that regarding activelinks, containing one possible 
> >> >> > way to
> >> >> > solve it via javascript:
> >> >> >
> >> >> > https://bugs.freenetproject.org/view.php?id=3207
> >> >> >
> >> >> > So when you implement it, please also do it for activelinks, as they 
> >> >> > are nice
> >> >> > to have and could be re-enabled then.
> >> >> >
> >> >> > xor
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] Asynchronous image loading

2009-06-19 Thread sashee
No, even javascript cannot send tab closing callback that is reliable.
It can only be achieved with keepalives missing.
Think about system crash when no action can be performed. On that case
the javascript cannot report that it is closed, so it is not reliable.

sashee

On Fri, Jun 19, 2009 at 5:13 PM, Matthew
Toseland wrote:
> On Friday 19 June 2009 14:48:11 sashee wrote:
>> Ofc not. HTTP is stateless, so in standard ways it cannot be notified
>> when a tab is closed.
>
> Yes I mean with javascript?
>>
>> On Fri, Jun 19, 2009 at 12:28 AM, Matthew
>> Toseland wrote:
>> > On Thursday 18 June 2009 17:02:06 sashee wrote:
>> >> With async image loading,activelinks will be loaded too.
>> >> As for the 21 secs. It can be decreased, but only to sacrifice
>> >> something else. 21 sec means the client can skip a keepalive, and fail
>> >> after the second. Since it's localhost, it's unlikely to fail even 1,
>> >> so it can be reduced to 11 sec. If we send keepalives more frequently,
>> >> it will consume more resources for all tabs to send them, but it will
>> >> reduce further the time needed to detect tab closes. It is easily
>> >> configured with constants though.
>> >
>> > There is no callback on a page being closed?
>> >>
>> >> sashee
>> >>
>> >> On Thu, Jun 18, 2009 at 11:33 AM, xor wrote:
>> >> > On Wednesday 17 June 2009 16:36:26 sashee wrote:
>> >> >> Hello folks!
>> >> >>
>> >> >> Some days ago, I've talked with nextgens about toadlet
>> >> >> continuations(it's asynchronous request processing), and he had a
>> >> >> point that when the user opens a site with lots of images, then it
>> >> >> needs many connections open for a long time, and it spawns many
>> >> >> threads at serverside, which is resource demanding and some OSes don't
>> >> >> allow. The browser has a maximum connection limit to the site, but the
>> >> >> user can overwrite it. But at the default, firefox opens only 2-3
>> >> >> connections to fetch the images, this way freenet don't start all the
>> >> >> fetching, just what is requested. So one problem is that if a user
>> >> >> alters the browser's config, then it will result many threads, if not,
>> >> >> then freenet can't download all the content simultanously.
>> >> >> I think with pushing, I'm working on, can be a solution for both
>> >> >> problems. When the page loads, freenet start fetching all the images,
>> >> >> and the browser gets the progress with 1 permanent connection. There
>> >> >> can be an image eg. "Image is loading...10%" and after some progress
>> >> >> change to 20% and so on, and when finishes downloading, it shows or
>> >> >> says eg. "Image finished loading, click to display". If it's done, we
>> >> >> don't need continuations anymore. Ofc it would need javascript to be
>> >> >> enabled.
>> >> >>
>> >> >> What you think?
>> >> >
>> >> > I filed a bug on that regarding activelinks, containing one possible 
>> >> > way to
>> >> > solve it via javascript:
>> >> >
>> >> > https://bugs.freenetproject.org/view.php?id=3207
>> >> >
>> >> > So when you implement it, please also do it for activelinks, as they 
>> >> > are nice
>> >> > to have and could be re-enabled then.
>> >> >
>> >> > xor
>> >
>> > ___
>> > Devl mailing list
>> > Devl at freenetproject.org
>> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>> >
>> ___
>> Devl mailing list
>> Devl at freenetproject.org
>> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>>
>>
>
>
>
> ___
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>



[freenet-dev] Asynchronous image loading

2009-06-19 Thread Matthew Toseland
On Friday 19 June 2009 14:48:11 sashee wrote:
> Ofc not. HTTP is stateless, so in standard ways it cannot be notified
> when a tab is closed.

Yes I mean with javascript?
> 
> On Fri, Jun 19, 2009 at 12:28 AM, Matthew
> Toseland wrote:
> > On Thursday 18 June 2009 17:02:06 sashee wrote:
> >> With async image loading,activelinks will be loaded too.
> >> As for the 21 secs. It can be decreased, but only to sacrifice
> >> something else. 21 sec means the client can skip a keepalive, and fail
> >> after the second. Since it's localhost, it's unlikely to fail even 1,
> >> so it can be reduced to 11 sec. If we send keepalives more frequently,
> >> it will consume more resources for all tabs to send them, but it will
> >> reduce further the time needed to detect tab closes. It is easily
> >> configured with constants though.
> >
> > There is no callback on a page being closed?
> >>
> >> sashee
> >>
> >> On Thu, Jun 18, 2009 at 11:33 AM, xor wrote:
> >> > On Wednesday 17 June 2009 16:36:26 sashee wrote:
> >> >> Hello folks!
> >> >>
> >> >> Some days ago, I've talked with nextgens about toadlet
> >> >> continuations(it's asynchronous request processing), and he had a
> >> >> point that when the user opens a site with lots of images, then it
> >> >> needs many connections open for a long time, and it spawns many
> >> >> threads at serverside, which is resource demanding and some OSes don't
> >> >> allow. The browser has a maximum connection limit to the site, but the
> >> >> user can overwrite it. But at the default, firefox opens only 2-3
> >> >> connections to fetch the images, this way freenet don't start all the
> >> >> fetching, just what is requested. So one problem is that if a user
> >> >> alters the browser's config, then it will result many threads, if not,
> >> >> then freenet can't download all the content simultanously.
> >> >> I think with pushing, I'm working on, can be a solution for both
> >> >> problems. When the page loads, freenet start fetching all the images,
> >> >> and the browser gets the progress with 1 permanent connection. There
> >> >> can be an image eg. "Image is loading...10%" and after some progress
> >> >> change to 20% and so on, and when finishes downloading, it shows or
> >> >> says eg. "Image finished loading, click to display". If it's done, we
> >> >> don't need continuations anymore. Ofc it would need javascript to be
> >> >> enabled.
> >> >>
> >> >> What you think?
> >> >
> >> > I filed a bug on that regarding activelinks, containing one possible way 
> >> > to
> >> > solve it via javascript:
> >> >
> >> > https://bugs.freenetproject.org/view.php?id=3207
> >> >
> >> > So when you implement it, please also do it for activelinks, as they are 
> >> > nice
> >> > to have and could be re-enabled then.
> >> >
> >> > xor
> >
> > ___
> > Devl mailing list
> > Devl at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
> >
> ___
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
> 
> 


-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] Asynchronous image loading

2009-06-19 Thread sashee
Ofc not. HTTP is stateless, so in standard ways it cannot be notified
when a tab is closed.

On Fri, Jun 19, 2009 at 12:28 AM, Matthew
Toseland wrote:
> On Thursday 18 June 2009 17:02:06 sashee wrote:
>> With async image loading,activelinks will be loaded too.
>> As for the 21 secs. It can be decreased, but only to sacrifice
>> something else. 21 sec means the client can skip a keepalive, and fail
>> after the second. Since it's localhost, it's unlikely to fail even 1,
>> so it can be reduced to 11 sec. If we send keepalives more frequently,
>> it will consume more resources for all tabs to send them, but it will
>> reduce further the time needed to detect tab closes. It is easily
>> configured with constants though.
>
> There is no callback on a page being closed?
>>
>> sashee
>>
>> On Thu, Jun 18, 2009 at 11:33 AM, xor wrote:
>> > On Wednesday 17 June 2009 16:36:26 sashee wrote:
>> >> Hello folks!
>> >>
>> >> Some days ago, I've talked with nextgens about toadlet
>> >> continuations(it's asynchronous request processing), and he had a
>> >> point that when the user opens a site with lots of images, then it
>> >> needs many connections open for a long time, and it spawns many
>> >> threads at serverside, which is resource demanding and some OSes don't
>> >> allow. The browser has a maximum connection limit to the site, but the
>> >> user can overwrite it. But at the default, firefox opens only 2-3
>> >> connections to fetch the images, this way freenet don't start all the
>> >> fetching, just what is requested. So one problem is that if a user
>> >> alters the browser's config, then it will result many threads, if not,
>> >> then freenet can't download all the content simultanously.
>> >> I think with pushing, I'm working on, can be a solution for both
>> >> problems. When the page loads, freenet start fetching all the images,
>> >> and the browser gets the progress with 1 permanent connection. There
>> >> can be an image eg. "Image is loading...10%" and after some progress
>> >> change to 20% and so on, and when finishes downloading, it shows or
>> >> says eg. "Image finished loading, click to display". If it's done, we
>> >> don't need continuations anymore. Ofc it would need javascript to be
>> >> enabled.
>> >>
>> >> What you think?
>> >
>> > I filed a bug on that regarding activelinks, containing one possible way to
>> > solve it via javascript:
>> >
>> > https://bugs.freenetproject.org/view.php?id=3207
>> >
>> > So when you implement it, please also do it for activelinks, as they are 
>> > nice
>> > to have and could be re-enabled then.
>> >
>> > xor
>
> ___
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>



[freenet-dev] Asynchronous image loading

2009-06-19 Thread Matthew Toseland
On Thursday 18 June 2009 17:02:06 sashee wrote:
> With async image loading,activelinks will be loaded too.
> As for the 21 secs. It can be decreased, but only to sacrifice
> something else. 21 sec means the client can skip a keepalive, and fail
> after the second. Since it's localhost, it's unlikely to fail even 1,
> so it can be reduced to 11 sec. If we send keepalives more frequently,
> it will consume more resources for all tabs to send them, but it will
> reduce further the time needed to detect tab closes. It is easily
> configured with constants though.

There is no callback on a page being closed?
> 
> sashee
> 
> On Thu, Jun 18, 2009 at 11:33 AM, xor wrote:
> > On Wednesday 17 June 2009 16:36:26 sashee wrote:
> >> Hello folks!
> >>
> >> Some days ago, I've talked with nextgens about toadlet
> >> continuations(it's asynchronous request processing), and he had a
> >> point that when the user opens a site with lots of images, then it
> >> needs many connections open for a long time, and it spawns many
> >> threads at serverside, which is resource demanding and some OSes don't
> >> allow. The browser has a maximum connection limit to the site, but the
> >> user can overwrite it. But at the default, firefox opens only 2-3
> >> connections to fetch the images, this way freenet don't start all the
> >> fetching, just what is requested. So one problem is that if a user
> >> alters the browser's config, then it will result many threads, if not,
> >> then freenet can't download all the content simultanously.
> >> I think with pushing, I'm working on, can be a solution for both
> >> problems. When the page loads, freenet start fetching all the images,
> >> and the browser gets the progress with 1 permanent connection. There
> >> can be an image eg. "Image is loading...10%" and after some progress
> >> change to 20% and so on, and when finishes downloading, it shows or
> >> says eg. "Image finished loading, click to display". If it's done, we
> >> don't need continuations anymore. Ofc it would need javascript to be
> >> enabled.
> >>
> >> What you think?
> >
> > I filed a bug on that regarding activelinks, containing one possible way to
> > solve it via javascript:
> >
> > https://bugs.freenetproject.org/view.php?id=3207
> >
> > So when you implement it, please also do it for activelinks, as they are 
> > nice
> > to have and could be re-enabled then.
> >
> > xor
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL: 



Re: [freenet-dev] Asynchronous image loading

2009-06-19 Thread sashee
Ofc not. HTTP is stateless, so in standard ways it cannot be notified
when a tab is closed.

On Fri, Jun 19, 2009 at 12:28 AM, Matthew
Toselandt...@amphibian.dyndns.org wrote:
 On Thursday 18 June 2009 17:02:06 sashee wrote:
 With async image loading,activelinks will be loaded too.
 As for the 21 secs. It can be decreased, but only to sacrifice
 something else. 21 sec means the client can skip a keepalive, and fail
 after the second. Since it's localhost, it's unlikely to fail even 1,
 so it can be reduced to 11 sec. If we send keepalives more frequently,
 it will consume more resources for all tabs to send them, but it will
 reduce further the time needed to detect tab closes. It is easily
 configured with constants though.

 There is no callback on a page being closed?

 sashee

 On Thu, Jun 18, 2009 at 11:33 AM, xorx...@gmx.li wrote:
  On Wednesday 17 June 2009 16:36:26 sashee wrote:
  Hello folks!
 
  Some days ago, I've talked with nextgens about toadlet
  continuations(it's asynchronous request processing), and he had a
  point that when the user opens a site with lots of images, then it
  needs many connections open for a long time, and it spawns many
  threads at serverside, which is resource demanding and some OSes don't
  allow. The browser has a maximum connection limit to the site, but the
  user can overwrite it. But at the default, firefox opens only 2-3
  connections to fetch the images, this way freenet don't start all the
  fetching, just what is requested. So one problem is that if a user
  alters the browser's config, then it will result many threads, if not,
  then freenet can't download all the content simultanously.
  I think with pushing, I'm working on, can be a solution for both
  problems. When the page loads, freenet start fetching all the images,
  and the browser gets the progress with 1 permanent connection. There
  can be an image eg. Image is loading...10% and after some progress
  change to 20% and so on, and when finishes downloading, it shows or
  says eg. Image finished loading, click to display. If it's done, we
  don't need continuations anymore. Ofc it would need javascript to be
  enabled.
 
  What you think?
 
  I filed a bug on that regarding activelinks, containing one possible way to
  solve it via javascript:
 
  https://bugs.freenetproject.org/view.php?id=3207
 
  So when you implement it, please also do it for activelinks, as they are 
  nice
  to have and could be re-enabled then.
 
  xor

 ___
 Devl mailing list
 Devl@freenetproject.org
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] Asynchronous image loading

2009-06-19 Thread Matthew Toseland
On Friday 19 June 2009 14:48:11 sashee wrote:
 Ofc not. HTTP is stateless, so in standard ways it cannot be notified
 when a tab is closed.

Yes I mean with javascript?
 
 On Fri, Jun 19, 2009 at 12:28 AM, Matthew
 Toselandt...@amphibian.dyndns.org wrote:
  On Thursday 18 June 2009 17:02:06 sashee wrote:
  With async image loading,activelinks will be loaded too.
  As for the 21 secs. It can be decreased, but only to sacrifice
  something else. 21 sec means the client can skip a keepalive, and fail
  after the second. Since it's localhost, it's unlikely to fail even 1,
  so it can be reduced to 11 sec. If we send keepalives more frequently,
  it will consume more resources for all tabs to send them, but it will
  reduce further the time needed to detect tab closes. It is easily
  configured with constants though.
 
  There is no callback on a page being closed?
 
  sashee
 
  On Thu, Jun 18, 2009 at 11:33 AM, xorx...@gmx.li wrote:
   On Wednesday 17 June 2009 16:36:26 sashee wrote:
   Hello folks!
  
   Some days ago, I've talked with nextgens about toadlet
   continuations(it's asynchronous request processing), and he had a
   point that when the user opens a site with lots of images, then it
   needs many connections open for a long time, and it spawns many
   threads at serverside, which is resource demanding and some OSes don't
   allow. The browser has a maximum connection limit to the site, but the
   user can overwrite it. But at the default, firefox opens only 2-3
   connections to fetch the images, this way freenet don't start all the
   fetching, just what is requested. So one problem is that if a user
   alters the browser's config, then it will result many threads, if not,
   then freenet can't download all the content simultanously.
   I think with pushing, I'm working on, can be a solution for both
   problems. When the page loads, freenet start fetching all the images,
   and the browser gets the progress with 1 permanent connection. There
   can be an image eg. Image is loading...10% and after some progress
   change to 20% and so on, and when finishes downloading, it shows or
   says eg. Image finished loading, click to display. If it's done, we
   don't need continuations anymore. Ofc it would need javascript to be
   enabled.
  
   What you think?
  
   I filed a bug on that regarding activelinks, containing one possible way 
   to
   solve it via javascript:
  
   https://bugs.freenetproject.org/view.php?id=3207
  
   So when you implement it, please also do it for activelinks, as they are 
   nice
   to have and could be re-enabled then.
  
   xor
 
  ___
  Devl mailing list
  Devl@freenetproject.org
  http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
 
 ___
 Devl mailing list
 Devl@freenetproject.org
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
 
 




signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] Asynchronous image loading

2009-06-19 Thread sashee
No, even javascript cannot send tab closing callback that is reliable.
It can only be achieved with keepalives missing.
Think about system crash when no action can be performed. On that case
the javascript cannot report that it is closed, so it is not reliable.

sashee

On Fri, Jun 19, 2009 at 5:13 PM, Matthew
Toselandt...@amphibian.dyndns.org wrote:
 On Friday 19 June 2009 14:48:11 sashee wrote:
 Ofc not. HTTP is stateless, so in standard ways it cannot be notified
 when a tab is closed.

 Yes I mean with javascript?

 On Fri, Jun 19, 2009 at 12:28 AM, Matthew
 Toselandt...@amphibian.dyndns.org wrote:
  On Thursday 18 June 2009 17:02:06 sashee wrote:
  With async image loading,activelinks will be loaded too.
  As for the 21 secs. It can be decreased, but only to sacrifice
  something else. 21 sec means the client can skip a keepalive, and fail
  after the second. Since it's localhost, it's unlikely to fail even 1,
  so it can be reduced to 11 sec. If we send keepalives more frequently,
  it will consume more resources for all tabs to send them, but it will
  reduce further the time needed to detect tab closes. It is easily
  configured with constants though.
 
  There is no callback on a page being closed?
 
  sashee
 
  On Thu, Jun 18, 2009 at 11:33 AM, xorx...@gmx.li wrote:
   On Wednesday 17 June 2009 16:36:26 sashee wrote:
   Hello folks!
  
   Some days ago, I've talked with nextgens about toadlet
   continuations(it's asynchronous request processing), and he had a
   point that when the user opens a site with lots of images, then it
   needs many connections open for a long time, and it spawns many
   threads at serverside, which is resource demanding and some OSes don't
   allow. The browser has a maximum connection limit to the site, but the
   user can overwrite it. But at the default, firefox opens only 2-3
   connections to fetch the images, this way freenet don't start all the
   fetching, just what is requested. So one problem is that if a user
   alters the browser's config, then it will result many threads, if not,
   then freenet can't download all the content simultanously.
   I think with pushing, I'm working on, can be a solution for both
   problems. When the page loads, freenet start fetching all the images,
   and the browser gets the progress with 1 permanent connection. There
   can be an image eg. Image is loading...10% and after some progress
   change to 20% and so on, and when finishes downloading, it shows or
   says eg. Image finished loading, click to display. If it's done, we
   don't need continuations anymore. Ofc it would need javascript to be
   enabled.
  
   What you think?
  
   I filed a bug on that regarding activelinks, containing one possible 
   way to
   solve it via javascript:
  
   https://bugs.freenetproject.org/view.php?id=3207
  
   So when you implement it, please also do it for activelinks, as they 
   are nice
   to have and could be re-enabled then.
  
   xor
 
  ___
  Devl mailing list
  Devl@freenetproject.org
  http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
 
 ___
 Devl mailing list
 Devl@freenetproject.org
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl





 ___
 Devl mailing list
 Devl@freenetproject.org
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] Asynchronous image loading

2009-06-19 Thread Matthew Toseland
On Friday 19 June 2009 16:18:12 sashee wrote:
 No, even javascript cannot send tab closing callback that is reliable.
 It can only be achieved with keepalives missing.
 Think about system crash when no action can be performed. On that case
 the javascript cannot report that it is closed, so it is not reliable.

Sure, we do need keepalives. But can javascript generate an unreliable report 
that the tab has been closed, that still happens most of the time, and is more 
or less instant, and if the browser crashes we will have to wait for the 
keepalive timeout?
 
 sashee
 
 On Fri, Jun 19, 2009 at 5:13 PM, Matthew
 Toselandt...@amphibian.dyndns.org wrote:
  On Friday 19 June 2009 14:48:11 sashee wrote:
  Ofc not. HTTP is stateless, so in standard ways it cannot be notified
  when a tab is closed.
 
  Yes I mean with javascript?
 
  On Fri, Jun 19, 2009 at 12:28 AM, Matthew
  Toselandt...@amphibian.dyndns.org wrote:
   On Thursday 18 June 2009 17:02:06 sashee wrote:
   With async image loading,activelinks will be loaded too.
   As for the 21 secs. It can be decreased, but only to sacrifice
   something else. 21 sec means the client can skip a keepalive, and fail
   after the second. Since it's localhost, it's unlikely to fail even 1,
   so it can be reduced to 11 sec. If we send keepalives more frequently,
   it will consume more resources for all tabs to send them, but it will
   reduce further the time needed to detect tab closes. It is easily
   configured with constants though.
  
   There is no callback on a page being closed?
  
   sashee
  
   On Thu, Jun 18, 2009 at 11:33 AM, xorx...@gmx.li wrote:
On Wednesday 17 June 2009 16:36:26 sashee wrote:
Hello folks!
   
Some days ago, I've talked with nextgens about toadlet
continuations(it's asynchronous request processing), and he had a
point that when the user opens a site with lots of images, then it
needs many connections open for a long time, and it spawns many
threads at serverside, which is resource demanding and some OSes 
don't
allow. The browser has a maximum connection limit to the site, but 
the
user can overwrite it. But at the default, firefox opens only 2-3
connections to fetch the images, this way freenet don't start all the
fetching, just what is requested. So one problem is that if a user
alters the browser's config, then it will result many threads, if 
not,
then freenet can't download all the content simultanously.
I think with pushing, I'm working on, can be a solution for both
problems. When the page loads, freenet start fetching all the images,
and the browser gets the progress with 1 permanent connection. There
can be an image eg. Image is loading...10% and after some progress
change to 20% and so on, and when finishes downloading, it shows or
says eg. Image finished loading, click to display. If it's done, we
don't need continuations anymore. Ofc it would need javascript to be
enabled.
   
What you think?
   
I filed a bug on that regarding activelinks, containing one possible 
way to
solve it via javascript:
   
https://bugs.freenetproject.org/view.php?id=3207
   
So when you implement it, please also do it for activelinks, as they 
are nice
to have and could be re-enabled then.
   
xor


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

[freenet-dev] Asynchronous image loading

2009-06-18 Thread sashee
With async image loading,activelinks will be loaded too.
As for the 21 secs. It can be decreased, but only to sacrifice
something else. 21 sec means the client can skip a keepalive, and fail
after the second. Since it's localhost, it's unlikely to fail even 1,
so it can be reduced to 11 sec. If we send keepalives more frequently,
it will consume more resources for all tabs to send them, but it will
reduce further the time needed to detect tab closes. It is easily
configured with constants though.

sashee

On Thu, Jun 18, 2009 at 11:33 AM, xor wrote:
> On Wednesday 17 June 2009 16:36:26 sashee wrote:
>> Hello folks!
>>
>> Some days ago, I've talked with nextgens about toadlet
>> continuations(it's asynchronous request processing), and he had a
>> point that when the user opens a site with lots of images, then it
>> needs many connections open for a long time, and it spawns many
>> threads at serverside, which is resource demanding and some OSes don't
>> allow. The browser has a maximum connection limit to the site, but the
>> user can overwrite it. But at the default, firefox opens only 2-3
>> connections to fetch the images, this way freenet don't start all the
>> fetching, just what is requested. So one problem is that if a user
>> alters the browser's config, then it will result many threads, if not,
>> then freenet can't download all the content simultanously.
>> I think with pushing, I'm working on, can be a solution for both
>> problems. When the page loads, freenet start fetching all the images,
>> and the browser gets the progress with 1 permanent connection. There
>> can be an image eg. "Image is loading...10%" and after some progress
>> change to 20% and so on, and when finishes downloading, it shows or
>> says eg. "Image finished loading, click to display". If it's done, we
>> don't need continuations anymore. Ofc it would need javascript to be
>> enabled.
>>
>> What you think?
>
> I filed a bug on that regarding activelinks, containing one possible way to
> solve it via javascript:
>
> https://bugs.freenetproject.org/view.php?id=3207
>
> So when you implement it, please also do it for activelinks, as they are nice
> to have and could be re-enabled then.
>
> xor
>
> ___
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>



[freenet-dev] Asynchronous image loading

2009-06-18 Thread xor
On Wednesday 17 June 2009 16:36:26 sashee wrote:
> Hello folks!
>
> Some days ago, I've talked with nextgens about toadlet
> continuations(it's asynchronous request processing), and he had a
> point that when the user opens a site with lots of images, then it
> needs many connections open for a long time, and it spawns many
> threads at serverside, which is resource demanding and some OSes don't
> allow. The browser has a maximum connection limit to the site, but the
> user can overwrite it. But at the default, firefox opens only 2-3
> connections to fetch the images, this way freenet don't start all the
> fetching, just what is requested. So one problem is that if a user
> alters the browser's config, then it will result many threads, if not,
> then freenet can't download all the content simultanously.
> I think with pushing, I'm working on, can be a solution for both
> problems. When the page loads, freenet start fetching all the images,
> and the browser gets the progress with 1 permanent connection. There
> can be an image eg. "Image is loading...10%" and after some progress
> change to 20% and so on, and when finishes downloading, it shows or
> says eg. "Image finished loading, click to display". If it's done, we
> don't need continuations anymore. Ofc it would need javascript to be
> enabled.
>
> What you think?

I filed a bug on that regarding activelinks, containing one possible way to 
solve it via javascript:

https://bugs.freenetproject.org/view.php?id=3207

So when you implement it, please also do it for activelinks, as they are nice 
to have and could be re-enabled then.

xor
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] Asynchronous image loading

2009-06-18 Thread Matthew Toseland
On Wednesday 17 June 2009 20:19:25 sashee wrote:
> Ok, I'll schedule that then.
> > One thing that *is* critical is that we stop loading the images if the user 
> > closes the page, but afaics the existing infrastructure will do that.
> 
> I really dont think that anything gets notified when the user closes
> the tab. So I dont think fetching is stopped then.
> 
> As I see the prefetching has a 1 minute timeout, so it isn't really
> solving things. Inline prefetch fetches stuff, but only those, that
> are fast, and kills the others. And the browser's request fetches the
> other(almost all) images, 2(3) at a time. Asyncronous fetching would
> solve that problem, because it can notify(and cancel) the fetches when
> the user actually closes the tab.

Or at least within 21 seconds of closing the tab. :)

Can you improve on that?
> 
> sashee
> 
> On Wed, Jun 17, 2009 at 8:28 PM, Matthew
> Toseland wrote:
> > On Wednesday 17 June 2009 19:23:22 sashee wrote:
> >> So my question is: Is it needed? If it helps, I'll do it before the
> >> midterm evals, but if it doesnt improve anything, then no need to
> >> program it.
> >
> > Yes. IMHO it is important. Prefetching has never worked well on new nodes, 
> > and doesn't solve the connection limit problem anyway. Also the 
> > infrastructure will be interesting as later on we may want notifications on 
> > loaded pages (e.g. "there is a more recent version of this page available", 
> > but maybe also critical node events).
> >
> > Feel free to make a very basic implementation where you either have the 
> > loaded image or you have a loading graphic with no indication of how far it 
> > has got. *Ideally* we'd have the loading images be dependant on how far the 
> > request has got, but this isn't essential, certainly not for a first 
> > approximation ... another interesting option would be to show a progress 
> > bar showing the overall progress, ETA, etc. One thing that *is* critical is 
> > that we stop loading the images if the user closes the page, but afaics the 
> > existing infrastructure will do that.
> >>
> >> On Wed, Jun 17, 2009 at 5:44 PM, sashee wrote:
> >> > Ok, thats true. But the browser won't show an image till all the image
> >> > above are shown, because it uses 2-3 connections to fetch the images
> >> > sequentially. It may happen that a few image that fetches very slowly
> >> > will hang all the others, even if they are completely present.
> >> >
> >> > sashee
> >> >
> >> > On Wed, Jun 17, 2009 at 4:46 PM, Daniel Cheng >> > gmail.com> wrote:
> >> >> On 17/6/2009 22:36, sashee wrote:
> >> >>>  this way freenet don't start all the
> >> >>> fetching, just what is requested... When the page loads, freenet
> >> >> ?> start fetching all the images,
> >> >>
> >> >> Did you look at your /config/fproxy page ?
> >> >> There is an option called "Enable prefetching of inline images" ..
> >> >>
> >> >>> What you think?
> >> >>
> >> >> :)
> >
> > ___
> > Devl mailing list
> > Devl at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
> >
> ___
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
> 
> 


-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL: 



Re: [freenet-dev] Asynchronous image loading

2009-06-18 Thread xor
On Wednesday 17 June 2009 16:36:26 sashee wrote:
 Hello folks!

 Some days ago, I've talked with nextgens about toadlet
 continuations(it's asynchronous request processing), and he had a
 point that when the user opens a site with lots of images, then it
 needs many connections open for a long time, and it spawns many
 threads at serverside, which is resource demanding and some OSes don't
 allow. The browser has a maximum connection limit to the site, but the
 user can overwrite it. But at the default, firefox opens only 2-3
 connections to fetch the images, this way freenet don't start all the
 fetching, just what is requested. So one problem is that if a user
 alters the browser's config, then it will result many threads, if not,
 then freenet can't download all the content simultanously.
 I think with pushing, I'm working on, can be a solution for both
 problems. When the page loads, freenet start fetching all the images,
 and the browser gets the progress with 1 permanent connection. There
 can be an image eg. Image is loading...10% and after some progress
 change to 20% and so on, and when finishes downloading, it shows or
 says eg. Image finished loading, click to display. If it's done, we
 don't need continuations anymore. Ofc it would need javascript to be
 enabled.

 What you think?

I filed a bug on that regarding activelinks, containing one possible way to 
solve it via javascript:

https://bugs.freenetproject.org/view.php?id=3207

So when you implement it, please also do it for activelinks, as they are nice 
to have and could be re-enabled then.

xor


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] Asynchronous image loading

2009-06-18 Thread sashee
With async image loading,activelinks will be loaded too.
As for the 21 secs. It can be decreased, but only to sacrifice
something else. 21 sec means the client can skip a keepalive, and fail
after the second. Since it's localhost, it's unlikely to fail even 1,
so it can be reduced to 11 sec. If we send keepalives more frequently,
it will consume more resources for all tabs to send them, but it will
reduce further the time needed to detect tab closes. It is easily
configured with constants though.

sashee

On Thu, Jun 18, 2009 at 11:33 AM, xorx...@gmx.li wrote:
 On Wednesday 17 June 2009 16:36:26 sashee wrote:
 Hello folks!

 Some days ago, I've talked with nextgens about toadlet
 continuations(it's asynchronous request processing), and he had a
 point that when the user opens a site with lots of images, then it
 needs many connections open for a long time, and it spawns many
 threads at serverside, which is resource demanding and some OSes don't
 allow. The browser has a maximum connection limit to the site, but the
 user can overwrite it. But at the default, firefox opens only 2-3
 connections to fetch the images, this way freenet don't start all the
 fetching, just what is requested. So one problem is that if a user
 alters the browser's config, then it will result many threads, if not,
 then freenet can't download all the content simultanously.
 I think with pushing, I'm working on, can be a solution for both
 problems. When the page loads, freenet start fetching all the images,
 and the browser gets the progress with 1 permanent connection. There
 can be an image eg. Image is loading...10% and after some progress
 change to 20% and so on, and when finishes downloading, it shows or
 says eg. Image finished loading, click to display. If it's done, we
 don't need continuations anymore. Ofc it would need javascript to be
 enabled.

 What you think?

 I filed a bug on that regarding activelinks, containing one possible way to
 solve it via javascript:

 https://bugs.freenetproject.org/view.php?id=3207

 So when you implement it, please also do it for activelinks, as they are nice
 to have and could be re-enabled then.

 xor

 ___
 Devl mailing list
 Devl@freenetproject.org
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] Asynchronous image loading

2009-06-18 Thread Matthew Toseland
On Thursday 18 June 2009 17:02:06 sashee wrote:
 With async image loading,activelinks will be loaded too.
 As for the 21 secs. It can be decreased, but only to sacrifice
 something else. 21 sec means the client can skip a keepalive, and fail
 after the second. Since it's localhost, it's unlikely to fail even 1,
 so it can be reduced to 11 sec. If we send keepalives more frequently,
 it will consume more resources for all tabs to send them, but it will
 reduce further the time needed to detect tab closes. It is easily
 configured with constants though.

There is no callback on a page being closed?
 
 sashee
 
 On Thu, Jun 18, 2009 at 11:33 AM, xorx...@gmx.li wrote:
  On Wednesday 17 June 2009 16:36:26 sashee wrote:
  Hello folks!
 
  Some days ago, I've talked with nextgens about toadlet
  continuations(it's asynchronous request processing), and he had a
  point that when the user opens a site with lots of images, then it
  needs many connections open for a long time, and it spawns many
  threads at serverside, which is resource demanding and some OSes don't
  allow. The browser has a maximum connection limit to the site, but the
  user can overwrite it. But at the default, firefox opens only 2-3
  connections to fetch the images, this way freenet don't start all the
  fetching, just what is requested. So one problem is that if a user
  alters the browser's config, then it will result many threads, if not,
  then freenet can't download all the content simultanously.
  I think with pushing, I'm working on, can be a solution for both
  problems. When the page loads, freenet start fetching all the images,
  and the browser gets the progress with 1 permanent connection. There
  can be an image eg. Image is loading...10% and after some progress
  change to 20% and so on, and when finishes downloading, it shows or
  says eg. Image finished loading, click to display. If it's done, we
  don't need continuations anymore. Ofc it would need javascript to be
  enabled.
 
  What you think?
 
  I filed a bug on that regarding activelinks, containing one possible way to
  solve it via javascript:
 
  https://bugs.freenetproject.org/view.php?id=3207
 
  So when you implement it, please also do it for activelinks, as they are 
  nice
  to have and could be re-enabled then.
 
  xor


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

[freenet-dev] Asynchronous image loading

2009-06-17 Thread Daniel Cheng
On 17/6/2009 22:36, sashee wrote:
>  this way freenet don't start all the
> fetching, just what is requested... When the page loads, freenet
 > start fetching all the images,

Did you look at your /config/fproxy page ?
There is an option called "Enable prefetching of inline images" ..

> What you think?

:)



[freenet-dev] Asynchronous image loading

2009-06-17 Thread sashee
Ok, I'll schedule that then.
> One thing that *is* critical is that we stop loading the images if the user 
> closes the page, but afaics the existing infrastructure will do that.

I really dont think that anything gets notified when the user closes
the tab. So I dont think fetching is stopped then.

As I see the prefetching has a 1 minute timeout, so it isn't really
solving things. Inline prefetch fetches stuff, but only those, that
are fast, and kills the others. And the browser's request fetches the
other(almost all) images, 2(3) at a time. Asyncronous fetching would
solve that problem, because it can notify(and cancel) the fetches when
the user actually closes the tab.

sashee

On Wed, Jun 17, 2009 at 8:28 PM, Matthew
Toseland wrote:
> On Wednesday 17 June 2009 19:23:22 sashee wrote:
>> So my question is: Is it needed? If it helps, I'll do it before the
>> midterm evals, but if it doesnt improve anything, then no need to
>> program it.
>
> Yes. IMHO it is important. Prefetching has never worked well on new nodes, 
> and doesn't solve the connection limit problem anyway. Also the 
> infrastructure will be interesting as later on we may want notifications on 
> loaded pages (e.g. "there is a more recent version of this page available", 
> but maybe also critical node events).
>
> Feel free to make a very basic implementation where you either have the 
> loaded image or you have a loading graphic with no indication of how far it 
> has got. *Ideally* we'd have the loading images be dependant on how far the 
> request has got, but this isn't essential, certainly not for a first 
> approximation ... another interesting option would be to show a progress bar 
> showing the overall progress, ETA, etc. One thing that *is* critical is that 
> we stop loading the images if the user closes the page, but afaics the 
> existing infrastructure will do that.
>>
>> On Wed, Jun 17, 2009 at 5:44 PM, sashee wrote:
>> > Ok, thats true. But the browser won't show an image till all the image
>> > above are shown, because it uses 2-3 connections to fetch the images
>> > sequentially. It may happen that a few image that fetches very slowly
>> > will hang all the others, even if they are completely present.
>> >
>> > sashee
>> >
>> > On Wed, Jun 17, 2009 at 4:46 PM, Daniel Cheng> > gmail.com> wrote:
>> >> On 17/6/2009 22:36, sashee wrote:
>> >>>  this way freenet don't start all the
>> >>> fetching, just what is requested... When the page loads, freenet
>> >> ?> start fetching all the images,
>> >>
>> >> Did you look at your /config/fproxy page ?
>> >> There is an option called "Enable prefetching of inline images" ..
>> >>
>> >>> What you think?
>> >>
>> >> :)
>
> ___
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>



[freenet-dev] Asynchronous image loading

2009-06-17 Thread sashee
So my question is: Is it needed? If it helps, I'll do it before the
midterm evals, but if it doesnt improve anything, then no need to
program it.

On Wed, Jun 17, 2009 at 5:44 PM, sashee wrote:
> Ok, thats true. But the browser won't show an image till all the image
> above are shown, because it uses 2-3 connections to fetch the images
> sequentially. It may happen that a few image that fetches very slowly
> will hang all the others, even if they are completely present.
>
> sashee
>
> On Wed, Jun 17, 2009 at 4:46 PM, Daniel Cheng 
> wrote:
>> On 17/6/2009 22:36, sashee wrote:
>>>  this way freenet don't start all the
>>> fetching, just what is requested... When the page loads, freenet
>> ?> start fetching all the images,
>>
>> Did you look at your /config/fproxy page ?
>> There is an option called "Enable prefetching of inline images" ..
>>
>>> What you think?
>>
>> :)
>> ___
>> Devl mailing list
>> Devl at freenetproject.org
>> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>>
>



[freenet-dev] Asynchronous image loading

2009-06-17 Thread Matthew Toseland
On Wednesday 17 June 2009 19:23:22 sashee wrote:
> So my question is: Is it needed? If it helps, I'll do it before the
> midterm evals, but if it doesnt improve anything, then no need to
> program it.

Yes. IMHO it is important. Prefetching has never worked well on new nodes, and 
doesn't solve the connection limit problem anyway. Also the infrastructure will 
be interesting as later on we may want notifications on loaded pages (e.g. 
"there is a more recent version of this page available", but maybe also 
critical node events).

Feel free to make a very basic implementation where you either have the loaded 
image or you have a loading graphic with no indication of how far it has got. 
*Ideally* we'd have the loading images be dependant on how far the request has 
got, but this isn't essential, certainly not for a first approximation ... 
another interesting option would be to show a progress bar showing the overall 
progress, ETA, etc. One thing that *is* critical is that we stop loading the 
images if the user closes the page, but afaics the existing infrastructure will 
do that.
> 
> On Wed, Jun 17, 2009 at 5:44 PM, sashee wrote:
> > Ok, thats true. But the browser won't show an image till all the image
> > above are shown, because it uses 2-3 connections to fetch the images
> > sequentially. It may happen that a few image that fetches very slowly
> > will hang all the others, even if they are completely present.
> >
> > sashee
> >
> > On Wed, Jun 17, 2009 at 4:46 PM, Daniel Cheng 
> > wrote:
> >> On 17/6/2009 22:36, sashee wrote:
> >>>  this way freenet don't start all the
> >>> fetching, just what is requested... When the page loads, freenet
> >> ?> start fetching all the images,
> >>
> >> Did you look at your /config/fproxy page ?
> >> There is an option called "Enable prefetching of inline images" ..
> >>
> >>> What you think?
> >>
> >> :)
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] Asynchronous image loading

2009-06-17 Thread sashee
Ok, thats true. But the browser won't show an image till all the image
above are shown, because it uses 2-3 connections to fetch the images
sequentially. It may happen that a few image that fetches very slowly
will hang all the others, even if they are completely present.

sashee

On Wed, Jun 17, 2009 at 4:46 PM, Daniel Cheng 
wrote:
> On 17/6/2009 22:36, sashee wrote:
>>  this way freenet don't start all the
>> fetching, just what is requested... When the page loads, freenet
> ?> start fetching all the images,
>
> Did you look at your /config/fproxy page ?
> There is an option called "Enable prefetching of inline images" ..
>
>> What you think?
>
> :)
> ___
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>



[freenet-dev] Asynchronous image loading

2009-06-17 Thread sashee
Hello folks!

Some days ago, I've talked with nextgens about toadlet
continuations(it's asynchronous request processing), and he had a
point that when the user opens a site with lots of images, then it
needs many connections open for a long time, and it spawns many
threads at serverside, which is resource demanding and some OSes don't
allow. The browser has a maximum connection limit to the site, but the
user can overwrite it. But at the default, firefox opens only 2-3
connections to fetch the images, this way freenet don't start all the
fetching, just what is requested. So one problem is that if a user
alters the browser's config, then it will result many threads, if not,
then freenet can't download all the content simultanously.
I think with pushing, I'm working on, can be a solution for both
problems. When the page loads, freenet start fetching all the images,
and the browser gets the progress with 1 permanent connection. There
can be an image eg. "Image is loading...10%" and after some progress
change to 20% and so on, and when finishes downloading, it shows or
says eg. "Image finished loading, click to display". If it's done, we
don't need continuations anymore. Ofc it would need javascript to be
enabled.

What you think?

sashee



[freenet-dev] Asynchronous image loading

2009-06-17 Thread Matthew Toseland
On Wednesday 17 June 2009 15:36:26 sashee wrote:
> Hello folks!
> 
> Some days ago, I've talked with nextgens about toadlet
> continuations(it's asynchronous request processing), and he had a
> point that when the user opens a site with lots of images, then it
> needs many connections open for a long time, and it spawns many
> threads at serverside, which is resource demanding and some OSes don't
> allow. The browser has a maximum connection limit to the site, but the
> user can overwrite it. But at the default, firefox opens only 2-3
> connections to fetch the images, this way freenet don't start all the
> fetching, just what is requested. So one problem is that if a user
> alters the browser's config, then it will result many threads, if not,
> then freenet can't download all the content simultanously.
> I think with pushing, I'm working on, can be a solution for both
> problems. When the page loads, freenet start fetching all the images,
> and the browser gets the progress with 1 permanent connection. There
> can be an image eg. "Image is loading...10%" and after some progress
> change to 20% and so on, and when finishes downloading, it shows or
> says eg. "Image finished loading, click to display". If it's done, we
> don't need continuations anymore. Ofc it would need javascript to be
> enabled.

IMHO it should just replace the progress image with the final image contents, 
i.e. change the link to point to the image now that we know it's been fetched 
(use some caching to avoid stalling, but mostly it should load fast).
> 
> What you think?

Apart from that, it sounds like a good solution.
> 
> sashee
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] Asynchronous image loading

2009-06-17 Thread sashee
Hello folks!

Some days ago, I've talked with nextgens about toadlet
continuations(it's asynchronous request processing), and he had a
point that when the user opens a site with lots of images, then it
needs many connections open for a long time, and it spawns many
threads at serverside, which is resource demanding and some OSes don't
allow. The browser has a maximum connection limit to the site, but the
user can overwrite it. But at the default, firefox opens only 2-3
connections to fetch the images, this way freenet don't start all the
fetching, just what is requested. So one problem is that if a user
alters the browser's config, then it will result many threads, if not,
then freenet can't download all the content simultanously.
I think with pushing, I'm working on, can be a solution for both
problems. When the page loads, freenet start fetching all the images,
and the browser gets the progress with 1 permanent connection. There
can be an image eg. Image is loading...10% and after some progress
change to 20% and so on, and when finishes downloading, it shows or
says eg. Image finished loading, click to display. If it's done, we
don't need continuations anymore. Ofc it would need javascript to be
enabled.

What you think?

sashee
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] Asynchronous image loading

2009-06-17 Thread Daniel Cheng
On 17/6/2009 22:36, sashee wrote:
  this way freenet don't start all the
 fetching, just what is requested... When the page loads, freenet
  start fetching all the images,

Did you look at your /config/fproxy page ?
There is an option called Enable prefetching of inline images ..

 What you think?

:)
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] Asynchronous image loading

2009-06-17 Thread Matthew Toseland
On Wednesday 17 June 2009 15:36:26 sashee wrote:
 Hello folks!
 
 Some days ago, I've talked with nextgens about toadlet
 continuations(it's asynchronous request processing), and he had a
 point that when the user opens a site with lots of images, then it
 needs many connections open for a long time, and it spawns many
 threads at serverside, which is resource demanding and some OSes don't
 allow. The browser has a maximum connection limit to the site, but the
 user can overwrite it. But at the default, firefox opens only 2-3
 connections to fetch the images, this way freenet don't start all the
 fetching, just what is requested. So one problem is that if a user
 alters the browser's config, then it will result many threads, if not,
 then freenet can't download all the content simultanously.
 I think with pushing, I'm working on, can be a solution for both
 problems. When the page loads, freenet start fetching all the images,
 and the browser gets the progress with 1 permanent connection. There
 can be an image eg. Image is loading...10% and after some progress
 change to 20% and so on, and when finishes downloading, it shows or
 says eg. Image finished loading, click to display. If it's done, we
 don't need continuations anymore. Ofc it would need javascript to be
 enabled.

IMHO it should just replace the progress image with the final image contents, 
i.e. change the link to point to the image now that we know it's been fetched 
(use some caching to avoid stalling, but mostly it should load fast).
 
 What you think?

Apart from that, it sounds like a good solution.
 
 sashee


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] Asynchronous image loading

2009-06-17 Thread sashee
Ok, thats true. But the browser won't show an image till all the image
above are shown, because it uses 2-3 connections to fetch the images
sequentially. It may happen that a few image that fetches very slowly
will hang all the others, even if they are completely present.

sashee

On Wed, Jun 17, 2009 at 4:46 PM, Daniel Chengj16sdiz+free...@gmail.com wrote:
 On 17/6/2009 22:36, sashee wrote:
  this way freenet don't start all the
 fetching, just what is requested... When the page loads, freenet
   start fetching all the images,

 Did you look at your /config/fproxy page ?
 There is an option called Enable prefetching of inline images ..

 What you think?

 :)
 ___
 Devl mailing list
 Devl@freenetproject.org
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] Asynchronous image loading

2009-06-17 Thread sashee
So my question is: Is it needed? If it helps, I'll do it before the
midterm evals, but if it doesnt improve anything, then no need to
program it.

On Wed, Jun 17, 2009 at 5:44 PM, sasheegsas...@gmail.com wrote:
 Ok, thats true. But the browser won't show an image till all the image
 above are shown, because it uses 2-3 connections to fetch the images
 sequentially. It may happen that a few image that fetches very slowly
 will hang all the others, even if they are completely present.

 sashee

 On Wed, Jun 17, 2009 at 4:46 PM, Daniel Chengj16sdiz+free...@gmail.com 
 wrote:
 On 17/6/2009 22:36, sashee wrote:
  this way freenet don't start all the
 fetching, just what is requested... When the page loads, freenet
   start fetching all the images,

 Did you look at your /config/fproxy page ?
 There is an option called Enable prefetching of inline images ..

 What you think?

 :)
 ___
 Devl mailing list
 Devl@freenetproject.org
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] Asynchronous image loading

2009-06-17 Thread Matthew Toseland
On Wednesday 17 June 2009 19:23:22 sashee wrote:
 So my question is: Is it needed? If it helps, I'll do it before the
 midterm evals, but if it doesnt improve anything, then no need to
 program it.

Yes. IMHO it is important. Prefetching has never worked well on new nodes, and 
doesn't solve the connection limit problem anyway. Also the infrastructure will 
be interesting as later on we may want notifications on loaded pages (e.g. 
there is a more recent version of this page available, but maybe also 
critical node events).

Feel free to make a very basic implementation where you either have the loaded 
image or you have a loading graphic with no indication of how far it has got. 
*Ideally* we'd have the loading images be dependant on how far the request has 
got, but this isn't essential, certainly not for a first approximation ... 
another interesting option would be to show a progress bar showing the overall 
progress, ETA, etc. One thing that *is* critical is that we stop loading the 
images if the user closes the page, but afaics the existing infrastructure will 
do that.
 
 On Wed, Jun 17, 2009 at 5:44 PM, sasheegsas...@gmail.com wrote:
  Ok, thats true. But the browser won't show an image till all the image
  above are shown, because it uses 2-3 connections to fetch the images
  sequentially. It may happen that a few image that fetches very slowly
  will hang all the others, even if they are completely present.
 
  sashee
 
  On Wed, Jun 17, 2009 at 4:46 PM, Daniel Chengj16sdiz+free...@gmail.com 
  wrote:
  On 17/6/2009 22:36, sashee wrote:
   this way freenet don't start all the
  fetching, just what is requested... When the page loads, freenet
    start fetching all the images,
 
  Did you look at your /config/fproxy page ?
  There is an option called Enable prefetching of inline images ..
 
  What you think?
 
  :)


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] Asynchronous image loading

2009-06-17 Thread sashee
Ok, I'll schedule that then.
 One thing that *is* critical is that we stop loading the images if the user 
 closes the page, but afaics the existing infrastructure will do that.

I really dont think that anything gets notified when the user closes
the tab. So I dont think fetching is stopped then.

As I see the prefetching has a 1 minute timeout, so it isn't really
solving things. Inline prefetch fetches stuff, but only those, that
are fast, and kills the others. And the browser's request fetches the
other(almost all) images, 2(3) at a time. Asyncronous fetching would
solve that problem, because it can notify(and cancel) the fetches when
the user actually closes the tab.

sashee

On Wed, Jun 17, 2009 at 8:28 PM, Matthew
Toselandt...@amphibian.dyndns.org wrote:
 On Wednesday 17 June 2009 19:23:22 sashee wrote:
 So my question is: Is it needed? If it helps, I'll do it before the
 midterm evals, but if it doesnt improve anything, then no need to
 program it.

 Yes. IMHO it is important. Prefetching has never worked well on new nodes, 
 and doesn't solve the connection limit problem anyway. Also the 
 infrastructure will be interesting as later on we may want notifications on 
 loaded pages (e.g. there is a more recent version of this page available, 
 but maybe also critical node events).

 Feel free to make a very basic implementation where you either have the 
 loaded image or you have a loading graphic with no indication of how far it 
 has got. *Ideally* we'd have the loading images be dependant on how far the 
 request has got, but this isn't essential, certainly not for a first 
 approximation ... another interesting option would be to show a progress bar 
 showing the overall progress, ETA, etc. One thing that *is* critical is that 
 we stop loading the images if the user closes the page, but afaics the 
 existing infrastructure will do that.

 On Wed, Jun 17, 2009 at 5:44 PM, sasheegsas...@gmail.com wrote:
  Ok, thats true. But the browser won't show an image till all the image
  above are shown, because it uses 2-3 connections to fetch the images
  sequentially. It may happen that a few image that fetches very slowly
  will hang all the others, even if they are completely present.
 
  sashee
 
  On Wed, Jun 17, 2009 at 4:46 PM, Daniel Chengj16sdiz+free...@gmail.com 
  wrote:
  On 17/6/2009 22:36, sashee wrote:
   this way freenet don't start all the
  fetching, just what is requested... When the page loads, freenet
    start fetching all the images,
 
  Did you look at your /config/fproxy page ?
  There is an option called Enable prefetching of inline images ..
 
  What you think?
 
  :)

 ___
 Devl mailing list
 Devl@freenetproject.org
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] Asynchronous image loading

2009-06-17 Thread Matthew Toseland
On Wednesday 17 June 2009 20:19:25 sashee wrote:
 Ok, I'll schedule that then.
  One thing that *is* critical is that we stop loading the images if the user 
  closes the page, but afaics the existing infrastructure will do that.
 
 I really dont think that anything gets notified when the user closes
 the tab. So I dont think fetching is stopped then.
 
 As I see the prefetching has a 1 minute timeout, so it isn't really
 solving things. Inline prefetch fetches stuff, but only those, that
 are fast, and kills the others. And the browser's request fetches the
 other(almost all) images, 2(3) at a time. Asyncronous fetching would
 solve that problem, because it can notify(and cancel) the fetches when
 the user actually closes the tab.

Or at least within 21 seconds of closing the tab. :)

Can you improve on that?
 
 sashee
 
 On Wed, Jun 17, 2009 at 8:28 PM, Matthew
 Toselandt...@amphibian.dyndns.org wrote:
  On Wednesday 17 June 2009 19:23:22 sashee wrote:
  So my question is: Is it needed? If it helps, I'll do it before the
  midterm evals, but if it doesnt improve anything, then no need to
  program it.
 
  Yes. IMHO it is important. Prefetching has never worked well on new nodes, 
  and doesn't solve the connection limit problem anyway. Also the 
  infrastructure will be interesting as later on we may want notifications on 
  loaded pages (e.g. there is a more recent version of this page available, 
  but maybe also critical node events).
 
  Feel free to make a very basic implementation where you either have the 
  loaded image or you have a loading graphic with no indication of how far it 
  has got. *Ideally* we'd have the loading images be dependant on how far the 
  request has got, but this isn't essential, certainly not for a first 
  approximation ... another interesting option would be to show a progress 
  bar showing the overall progress, ETA, etc. One thing that *is* critical is 
  that we stop loading the images if the user closes the page, but afaics the 
  existing infrastructure will do that.
 
  On Wed, Jun 17, 2009 at 5:44 PM, sasheegsas...@gmail.com wrote:
   Ok, thats true. But the browser won't show an image till all the image
   above are shown, because it uses 2-3 connections to fetch the images
   sequentially. It may happen that a few image that fetches very slowly
   will hang all the others, even if they are completely present.
  
   sashee
  
   On Wed, Jun 17, 2009 at 4:46 PM, Daniel Chengj16sdiz+free...@gmail.com 
   wrote:
   On 17/6/2009 22:36, sashee wrote:
    this way freenet don't start all the
   fetching, just what is requested... When the page loads, freenet
     start fetching all the images,
  
   Did you look at your /config/fproxy page ?
   There is an option called Enable prefetching of inline images ..
  
   What you think?
  
   :)
 
  ___
  Devl mailing list
  Devl@freenetproject.org
  http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
 
 ___
 Devl mailing list
 Devl@freenetproject.org
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
 
 




signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl