Hi Dobes, You could try enabling the GWT Lightweight Metrics functionality to measure time spent during different phases in a GWT RPC call.
Lightweight Metrics (see GWT RPC Event diagram): http://code.google.com/p/google-web-toolkit/wiki/LightweightMetricsDesign Enabling the lightweight metrics in place is as simple as declaring the global stats collector function in your host HTML page and putting in place a way to report the results. For example, you could define a logging div where you could add each metric reported. The code sample below should help you get on your way. <head> <script language='javascript'> function eventToString(event) { // return some string representation of this event return event.evtGroup + " | " + event.moduleName + " | " + event.subSystem + " | " + event.type + " | " + event.millis; } window.__gwtStatsEvent = function(event) { var loggingDiv = document.getElementById('log'); if (!loggingDiv) { // Our logging div is not yet attached to the DOM // Initialize a temporary buffer if we need to this.buffer = (this.buffer) ? this.buffer : []; // log data here this.buffer.push(event); } else { if (this.buffer) { // We have some data that was reported before // the div was connected for (var i = 0; i < buffer.length; i++) { // print it all to the div var bufferedEvent = buffer[i]; var logline = document.createElement("div"); logline.id = "logline"; logline.innerHTML = eventToString(bufferedEvent); loggingDiv.appendChild(logline); } this.buffer = null; } // log the current event to the div var logline = document.createElement("div"); logline.id = "logline"; logline.innerHTML = eventToString(event); loggingDiv.appendChild(logline); } </script> </head> That should help measure the time it takes for phases in the GWT RPC process and should let you uncover which phase is responsible for the slowdown. Once we've figured that out, it should help you come up with a better data-per-call RPC strategy. Hope that helps, -Sumit Chandel On Thu, Apr 23, 2009 at 11:22 AM, Dobes <[email protected]> wrote: > > Sometimes I'm sending a pretty large array from the server and I think > it may be locking up the browser for a while (maybe up to a second) > and in some cases causing a dialog to pop up saying "a script on this > page is running slowly, do you want to kill it?" > > Is there a good way to measure the time spent decoding RPC requests? > > Has anyone attempted to change the RPC decoder to run incrementally? > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
