On Thu, Apr 9, 2009 at 11:03 PM, David Pollak <feeder.of.the.be...@gmail.com
> wrote:

>
>
> On Thu, Apr 9, 2009 at 4:35 AM, olambo <olambo...@gmail.com> wrote:
>
>>
>>
>> >
>> > > Also, is the Lift AJAX script necessary for anything other than Comet?
>> > > If I have a site that's using no AJAX or Comet, can I just turn this
>> > > off? If so, how?
>> >
>> > No... it's also used for Garbage Collection. :-(
>>
>> I've also noticed this running. Is this Garbage Collection of
>> javascript or a call to the JVM?
>
>
> Lift stores a mapping between GUIDs it assigns to HTML elements on the
> client to functions to execute when those elements are processed by the
> server.  For example:
>
> SHtml.text("", s => println("The text box was "+s))
>
> The function (s => println("The text box was "+s)) is stored on the server.
>  The <input type="text" .../> tag has a GUID that binds the HTML element to
> the function.  If the HTML element is not on the client any more, the
> reference to the function should be dropped so it's not using resources.
>  This is garbage collection.  It is not JVM garbage collection, but it is
> removal of unused references.
>
>
I can see that it needs to remove unused references, but why in an ajax
call, why not as part of the lift request lifecycle? If the client has
closed the browser the ajax call isn't going to be called anyway. Why would
a single HTML element in a single client response have disappeared (heavy
use of ajax and javascript?).

Now why is lift saving references - obviously to support the next request
from the current page, which might involve the back button (and
subsequently, the forward button). So in my mind, I should be able to
specify I want the last N back button calls supported and any functions
older than that get dropped from the reference map. But obviously this isn't
whats happening, because an ajax call to do it, makes no sense (assuming I
have no javascript and no ajax calls).

So what references are being removed and why ajax to remove them?


>
>>
>>
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to