I am displaying 843 rows x 8 columns (one date string and 7 ints) from my database using a Table from Google Visualization. I get the data through RPC (List)
The problem with it that it takes about 10 seconds to refresh. If i reorder it clicking on the columns it even freezes the browser for 10 seconds.
What can i do to make it faster?
hmm, first of all, 843x8=6744 is a very large number, however, having so many cells in a table in html would usually
not hinder performance to that extent...
however data processing on the other hand can hinder the performance. how exactly are you retrieving data ?[formatted / raw ]
are you doing any processing on the data being retrieved or are you directly displaying the data on screen ?
P.S. What is your site made in (http://www.salvin.in), seems gadgets except they have no placeholders?
The large number of cells does not hinder HTML at all, as i was displaying it using JSP at first with under a second delay (unnoticeable).
Also the data itself is not an issue, the response is: 31.8 KB (32,626 bytes)
The process through which i display is through RPC, populating a list of beans through a simple ORM code, which i iterate and set the GWT Visualization Table Widget DataTable object.
Basicly i replicated this article method: http://www.ibm.com/developerworks/opensource/library/os-ad-gwt3/ Reflection might be the issue here.
What i aim to eliminate though is the slowness of loading (although asynchronous it's annoying).
I already been given an answer on a mailing list in the form of:
http://www.ibm.com/developerworks/web/library/wa-aj-patterns/index.html which seems a very good article, which i'll try later on, i believe it will fix my problem of loading the page. Don't know about the freezing part yet, the usual solution for processing problems is eliminate the processing (send more data as is after processing server side - but in the world of web development, sending more data over the internet is not a good solution). An optimization of the ideea i just described would be giving an array of the 'id' column coresponding to every other column, reordered in the order that a certain filtering would give (ascending or descending) - eg the filter would be if the string column needs be the factor of reordering, an underlying array of id values that would reorder the table after itself (not doing a sort comparing strings but reordering the table after the preordering of IDs coresponding to the strings).
maybe you could do the sort operation at the server.
Its advisible to make a dumb client that does not do operations such as sorting, filtering, etc.
those can be done at the server.
@ my site, i sent you a pm...
Joined: Nov 29, 2009
silverlight requires your client to have a plugin installed,
consider this portability when thinking of changing your entire technology altogether.
Joined: Nov 29, 2009
I'm not changing it, in the words of duke nukem: "i'm an equal oportunity ass kicker".
I'm doing all this for a portofolio, so my goal is to intermingle all the newest technologies.
I'm already doing struts 2 + GWT. Silverlight would be nice instead of flash for a banner for instance, or doing some animation since that's its strong point, beeing a light version of WPF. Speaking of which, WPF through XBAP can port desktop applications to the browser (enabling you to truly build real games if you wished to).
Are you testing using a stand alone instance, such as GWT running on Jetty, or are you using the Eclipse-based plugin server? I find the stand alone server runs a lot better than the compatibility mode test app the plugin uses.
I don't understand. I do debugging in hosted mode and i deploy on tomcat (using eclipse to publish), then i see the result in FF and IE7 (or in Eclipse's embedded browser).
I notice it being slow in the production phase.
I don't have time to do the optimizations, i set aside a bunch of techniques for later, to wich i linked above. One other issue as i pointed out is the lack of proper ORM.
I used this (which uses reflection), to populate a list of beans representing the rows:
When i looked at the code generated, the result is bloated out from the table's functionality, which i will trim down since i probably don't need it all.
Maneesh Godbole wrote:Maybe you want to consider using speedtracer to figure out the bottlenecks?
I agree with maneesh godbole, we too used speed tracer to figure out bottlenecks with code output style as "DETAILED" in GWT.
The best solution is Firebug, it profile result returns "own time" - Time spent by a function Excluding nested calls.
That is the best statistic you can look at !