GWT Performance Issues

436 views
Skip to first unread message

CSchulz

unread,
Dec 6, 2011, 4:33:04 PM12/6/11
to google-we...@googlegroups.com
I was wondering if anyone has had any issues with performance in GWT and how you solved it. Right now there is a project I'm working on where I get some json and generate some views and it's maybe 100 items long and GWT takes around 8 seconds to render it in Chrome. I'm concerned because I'm going to be working on a bigger project and was planning on using GWT but now I'm not so sure. On the bigger project it could end up taking 30 seconds or more just to render the views each time they open a new page.

I've read about using timers to try and keep the DOM from freezing, but it prolongs the rendering period. Is there any way to improve performance in GWT, or is this just how the framework is? I've done stuff in Sproutcore before and didn't have any issues with performance, but I'm not sure it's the right framework for the project I'll be doing.

Any thoughts would help. Thanks in advance!

Armishev, Sergey

unread,
Dec 6, 2011, 4:55:38 PM12/6/11
to google-we...@googlegroups.com

Publish your code. I suspect the problem might be there. Also Chrome in development mode might be slow (or very slow) compare to production where it usually the fastest browser

-Sergey

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/V3mLBnZLcBsJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


_____________________________________________________
This electronic message and any files transmitted with it contains
information from iDirect, which may be privileged, proprietary
and/or confidential. It is intended solely for the use of the individual
or entity to whom they are addressed. If you are not the original
recipient or the person responsible for delivering the email to the
intended recipient, be advised that you have received this email
in error, and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited. If you received this email
in error, please delete it and immediately notify the sender.
_____________________________________________________

Jens

unread,
Dec 6, 2011, 5:46:57 PM12/6/11
to google-we...@googlegroups.com
Just keep in mind that development mode is really a lot slower than the final compiled javascript code (development mode in Firefox seems to be the fastest, Safari is ok, Chrome feels slow). 

How do you generate your views?

I am not quite sure but I think something like:

FlowPanel wrapper = new FlowPanel()
for(Person p : persons) {
  wrapper.add(new PersonView(person));
}
containerView.add(wrapper)

could have a better performance than:

for(Person p : persons) {
  containerView.add(new PersonView(person));
}

because the first example fills the wrapper while it is not attached to the DOM yet.

-- J.

CSchulz

unread,
Dec 7, 2011, 12:07:10 AM12/7/11
to google-we...@googlegroups.com
Yeah, it entirely was running in Eclipse and when I compile the project and publish it, it does run much faster. I always generate the views first and then push the changes out to the DOM in one or two steps because I know that's the fastest way to do it. I just didn't realize how much slower it ran in dev mode. Thanks again!

CSchulz

unread,
Dec 7, 2011, 6:31:29 PM12/7/11
to google-we...@googlegroups.com
I created this little app that will generate a bunch of rows for you. Inside of each row is 5 Labels that pull the date.


So type in something like "5000" and it should render pretty fast and give you the amount of time it took. For each row it's just pulling the date and dropping that in there. In Chrome I just got 507 ms on 10000 rows. So I guess what I'm trying to say is, that completely alleviates my GWT performance concerns. :) Especially considering that browsers are getting faster and faster at processing javascript with each update.

Thomas Broyer

unread,
Dec 8, 2011, 3:56:00 AM12/8/11
to google-we...@googlegroups.com
If you need to dynamically create a lot of rows based on data; have a look at CellTable, instead of building a Grid or FlexTable and putting widgets in there. It's a total shift in how to approach the problem, but it's designed for rendering performance in mind (to be usable on mobile devices, for instance)

CSchulz

unread,
Dec 8, 2011, 1:00:10 PM12/8/11
to google-we...@googlegroups.com
I'll have to play around with it more. Does it just do paging on the data? A lot of the data we'll be displaying won't be in rows and columns. This was mostly just a test to see how well it would render views under extreme conditions. The cell list could be super useful. Thanks!
Reply all
Reply to author
Forward
0 new messages