27

I'm using Eclipse Galileo with latest GWT 2.0 version in development mode, but it runs really slow (I need to wait about a minute to open one page, but after compilation, my application works very well when I run it using Tomcat 5.5).

My code is not too heavy and I guess there is an OS-related or software inconsistency problem, because I'd this problem before, but when I reinstalled Windows Vista SP2 (I formatted my Windows drive and reinstalled it), my problem was resolved for a few days and then again it became too slow.

I didn't install any special software on my Windows machine, so I really don't know why this problem occurs. Any suggestion ?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Ehsan Khodarahmi
  • 4,772
  • 10
  • 60
  • 87

7 Answers7

36

If it has become unusually slow, but was faster previously, and you are debugging, that might be because you have a breakpoint set on a method entry. This can make things extremely slow, even if the breakpoint is not hit. Try clearing your breakpoints.

Jon Vaughan
  • 2,058
  • 1
  • 18
  • 11
  • 4
    This is good general tip when debugging, even with plain old java code – Guillaume Feb 01 '12 at 15:12
  • 1
    I had this problem with a Breakpoint in a Filter and Servlet "processCall" method. Saved me a hell of time (2min instead of 5s for application launch), but why is behaving like this? – Michael Laffargue May 23 '13 at 06:50
  • I had around 20 break point in my GWT code. Running in debug mode in Eclipse was VERY VERY slow. I removed the breakpoint and it can back as before: very QUICK ! – Martin Magakian Feb 06 '14 at 14:27
  • After removing breakpoints debug mode is smooth like a silk.!! – Jess May 19 '15 at 20:03
4

If you're using smartgwt make sure firebug or similar is disabled. That will really slow down your browser in dev mode.

And as far as NetBeans is concerned there really is a plugin for GWT called GWT4NB. But the IDE is not your problem :)

Bogdan
  • 5,368
  • 9
  • 43
  • 62
  • I already checked for firebug & that is disabled. I also think the IDE is not the reason of this problem, but what causes that ??? Its a mystery ! – Ehsan Khodarahmi May 27 '10 at 14:32
3

First time you load the page, it loads all the necessary javacode (and the JVM). Later, each refresh of the page will only loads the changed javacode then execute the whole (I might be wrong though). So if you're closing the browser then reopening your page each time you want to see the changes you made, yes it's going to be slow. If you refresh the page each time, it SHOULD be fast (if the changes you made weren't huge).

Eclipse + GWT 2.0 is not the reason why it's slow... (by the way Shubhkarman, if I'm correct there is no GWT plugin for netbeans...)

Zwik
  • 646
  • 1
  • 9
  • 21
  • No, closing browser can't help me, I think this problem is a little more complicated than closing & re-opening or refreshing the browser !!! I'v tried with firefox, chrome & IE, all have same problem ! – Ehsan Khodarahmi May 24 '10 at 18:19
  • & of course im agree with u, Eclipse + GWT 2.0 is not the reason why it's slow !!! & also there is no plugin for net beans . – Ehsan Khodarahmi May 24 '10 at 18:36
  • No, you should *not* close the browser. Like Zwik said, after the initial load (which might take a minute and make the browser unresponsive), all the subsequent refreshes should be very fast. If *that's* not the case, then we can investigate further. – Igor Klimer May 24 '10 at 18:54
  • No, subsequent refreshes are as slow as initial load or may slower, I'm using smartgwt2.2 & for example it takes about 1 minute to fetch into a simple grid (I guess this problem may related to Jetty, don't u think ???). – Ehsan Khodarahmi May 25 '10 at 06:38
3

Delete gwt cache from temporary folders like images. rpc files..etc. than see the performance. it is one of the cause to slow in hosted mode.

kumar kasimala
  • 759
  • 1
  • 6
  • 17
1

I had similar kind of issue and I found that it was happening because of number of break points. After reducing number of break points performance got improved.

1

I've found that the performance difference between running the GWT hosted mode in debug vs. non-debug to be large. If you're running with debug, try running without to see if that helps.

The initial page load can be slow, but once you get going just clicking refresh on my browser reloads the updated project in just a few seconds.

gerdemb
  • 11,275
  • 17
  • 65
  • 73
  • Yes, that's true, when I browse my projct in run mode instead of debug mode, its speed is OK. but what's the problem ? I need to execute it faster in debug mode, because with such slow speed it takes 100 years for debugging an application !!! Any idea ?! – Ehsan Khodarahmi May 25 '10 at 18:05
  • I don't know if any except trying to minimize the amount of time you are using debug mode. I find that most of the time I can figure out my problem without using debug mode. – gerdemb May 25 '10 at 18:44
  • 1
    May sometimes i can figure out my problem without using debug mode, but there are many situations which i have to use debug mode (for example u can't specify any breakpoint or see variable values in running mode). so, this is not the solution, this is just cleaning the question ! – Ehsan Khodarahmi May 26 '10 at 03:48
0

Even I had the same issue with GWT. I've started testing with firefox now. first time when I ran the debug on firefox, it was slow.

I set the log level to 'info' in the runconfig > gwt tab

So, I restrated my workspace and the firefox. Then 'debug >myGWTapplication '

When you open your application on debug mode, wait for the browser plugin to connect now.

This time it does not write all the log lines in the development mode, and it is faster.

I think the firefox and the logging has made the differance. Now I do not see much lag.

Also as mentioned in the above comments, remove the debug points, i've removed all, and use then when necessary.

Edit: tried it on the IE8 - it is fast event there.

Zeus
  • 6,386
  • 6
  • 54
  • 89