Hi Jhonny,

please send your mails to the mailing list. This way other users also 
can benefit.



jhonny thio wrote:
> Rely on events rather than polling the server could be a solution if 
> this is a scenario for your application. ===> I don't understand about this 
> step. Can you tell me how ?
I think of events on the client-side on which you can react. First of 
all you should explain why you need to poll the server. Maybe it is 
possible to work out other solutions.

cheers,
   Alex


> ----- Original Message ----
> From: Alexander Back <[EMAIL PROTECTED]>
> To: qooxdoo Development <qooxdoo-devel@lists.sourceforge.net>
> Sent: Thursday, July 31, 2008 12:26:00 AM
> Subject: Re: [qooxdoo-devel] Memory on remote.Request in the TIMER
> 
> Hi Jhonny,
> 
> jhonny thio wrote:
>> hii...
>> I have an application that using a timer (every 1 second). The timer will 
>> always request data to the AJAX (php)..
> Just a curious question: is this really necessary for your application 
> or can you rely on events rather than polling the server every second?
> 
>> Here is the code : 
>>
>> timer = new qx.client.Timer(1000); 
>> timer.addEventListener("interval", this._timerku, this);        
>> timer.start(); 
>>
>> _timerku : function()
>>  {
>>         var reqall = new qx.io.remote.Request("JtChat/thread.php", "GET", 
>> "text/plain");
>>         reqall.send();
>>         reqall.addEventListener("completed", function(e){
>>             .....
>>             .....
>>             .....
>>         }, this);
>>  }
>>
>> It mean every second the program will make a new object (==> reqall). Does 
>> it consume a lot memory?
> Every request object is disposed after the request is completed, so in 
> theory there should be no increasing memory consumption. However the 
> garbage collection mechanism of the browsers do not release memory of 
> disposed objects right away. So it may lead to a increasing memory 
> consumption temporarily (before the cycle of the gargabe collector starts).
> 
>> Maybe someone has a good step how to request AJAX every 1s ?
> Rely on events rather than polling the server could be a solution if 
> this is a scenario for your application.
> 
> cheers,
>    Alex

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to