It's all Javascript so it's all going to be UTF AFAIK.  As for the updates,
I think you're architecture is just wrong (you could potentially see results
from the server out of order).

A better approach would be

myCallback = new AsyncCallback<T> {
   void onFailure(Throwable t) { fetchDataFromServer(); }
   void onSuccess(T r) { fetchDataFromServer(); }
}

fetchDataFromServer()
{
     rpcCall(myCallback);
}

That way, if you've got a slow client your not going to overwhelm them where
you're generating timer events faster than they can be handled.  It should
also scale up & down gracefully with the performance of the client
browser/machine.

If you want to ensure a minimum of 2 seconds, then do:

fetchDataFromServer() {
  fetchTimer.schedule(Math.max(1, System.currentTimeMillis() - lastUpdate));
  lastUpdate = System.currentTimeMillis();
}

& then fetchTimer would actually do the rpc invocation.

As for the blinking, I'm not sure how you are doing it, but I would
recommend adding & removing a CSS class name (i.e addStyleName or.
addStyleDependantName). & have the CSS actually define what the visual
representation is.

On Mon, Mar 23, 2009 at 10:15 PM, denis56 <[email protected]>wrote:

>
> His,
>
> does anyone know if there are performance implications with having 2
> timers running on a single page?
>
> I am designing an application where one timer does background fetching
> of updates (2s) while the other (0.5s) updates gui elements to achieve
> blinking behavior. It is especially noticeable in IE, that the
> background updates take longer than 2s and that the browser is
> jittering and fails to respond immediately. Has anyone encountered
> something like that. Maybe having 2 timers is too much, have no idea.
>
> Also, do GWT UI components understand ISO-8859-1 encoding? I cannot
> display non-ASCII letters in a label, however, the data coming from a
> RPC invocation displays properly. strange.
>
>
> Thanks
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to