GWT 托管模式非常慢
我们确实在 Eclipse Ganymede(Windwos XP 3GB RAM)中运行 GWT 托管模式时遇到问题。当我们以托管模式启动应用程序时,启动需要很长时间,而且应用程序启动后的事务也需要几分钟才能做出反应。 Javascript 和服务器之间的通信似乎需要很长时间。
在此期间,处理器几乎没有负载。即使从外部浏览器编译和启动也无济于事。
奇怪的是,我们确实有另外两台计算机(一台 Windows XP 一台 Linux)具有完全相同的设置,其中托管模式以正常速度工作,对于同一应用程序没有任何问题。
We do have problems with GWT hosted mode running in Eclipse Ganymede (Windwos XP 3GB RAM). When we start our application in hosted mode it takes very long to start and also the transactions once the application is started are taking minutes to react. It seems as if it takes very long to communicate between Javascript and server.
The processor shows almost no load during this time. Even compiling and starting from an external browser does not help.
Strange is that we do have two other computers (one Windows XP one Linux) with exact the same setup where the hosted mode is working at normal speed without any problems for the same application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
帮自己一个忙,迁移到 GWT 2.0(当前为 RC2)并利用进程外托管模式 (OOPHM),它可以让您直接在浏览器中进行调试,而且速度快如闪电!
http://code.google.com/p/google-web-工具包/wiki/UsingOOPHM
Do yourself a favour, move to GWT 2.0 (currently in RC2) and take advantage of Out Of Process Hosted Mode (OOPHM), which lets you debug straight in the browser, and is lightning fast!
http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM
尝试删除所有断点。在这种情况下它对我有帮助。显然,如果您在程序的关键点放置断点,则可能会导致托管模式下的一切几乎停止。
Try removing all breakpoints. It helped me in such a scenario. Apparently if you place breakpoints in critical points in the program, it can cause everything to grind to nearly a halt in hosted mode.
我赞同切换到 GWT 2 的建议。但是请注意,使用 GWT 2 时,Chrome 中的托管模式非常慢。我最近从 1.7 切换到 2.0,发现托管模式非常慢......直到我切换到 Firefox。原因是 Chrome 的进程模型对 OOPHM 不利,至少现在是这样。
I second the suggestion to switch to GWT 2. Please note, however, that with GWT 2, hosted mode is very slow in Chrome. I recently switched from 1.7 to 2.0 and found hosted mode to be very slow ... until I switched to Firefox. Reason for this is that Chrome's process model is not benificial to OOPHM, at least now.
一些想法:
A few ideas: