11

GWT 2.5.1

Anytime running GWT DevMode generates a new huge cache file under /tmp directory now, consequently the OS warns low disk space. However, this problem has never popped up in the past.

The file gwtXXXbyte-cache (XXX being a long random number) is nearly 1 GB big. Is it normal?

The cache file is cleaned up automatically after the DevMode session ends. BTW, rebooting the machine doesn't help.

@EDIT

In comparison above, running GWT starter application on DevMode generates the new cache file about 50 MB size. Is it oversize, too?

@EDIT 2

I modifed GWT UI releated source code and ran DevMode again. Later, the new huge cache file gwtYYYbyte-cache (YYY being another long random number) was generated with the same size as before - exact number of bytes. Any ideas?

@EDIT 3

After manual removal of ./gwt-unitCache, ./war/WEB-INF/deploy and ./war/ZZZ directory (ZZZ being the hosted GWT application on DevMode), the next DevMode session generates the /tmp/gwtXXXbyte-cache file shrinking to a few KB.

@EDIT 4

Launching DevMode with the option -workDir DDD (DDD being another writable directory) doesn't work. The cached staffs keep writing to the default /tmp directory.

4

2 回答 2

4

1GB 对于开发目的来说太多了。我能想到的唯一原因是您在 .gwt.xml 文件中设置了很多排列。您应该将开发过程中的排列数量减少到最低限度(仅包括您正在使用的规范)。您可以使用DevGuideCompileReport来定位问题。

编辑:

其他用户已报告该常见问题。它与 eclipse 插件没有正确删除临时文件有关。该问题已被报告并受到 GWT 用户的广泛关注,但尚未发布具体补丁。解决方法是手动删除文件或编写脚本为您完成工作

google-plugin-for-eclipse-issue74

于 2013-08-25T09:22:38.830 回答
2

这是在 GWT 之后清理的 Windows 批处理脚本:

@ECHO OFF

ECHO Cleaning ImageResourceGenerator files ...
IF EXIST "%TEMP%\ImageResourceGenerator*" DEL "%TEMP%\ImageResourceGenerator*" /F /Q

ECHO Cleaning uiBinder files ...
IF EXIST "%TEMP%\uiBinder*" DEL "%TEMP%\uiBinder*" /F /Q

ECHO Cleaning gwt files ...
IF EXIST "%TEMP%\gwt*" DEL "%TEMP%\gwt*" /F /Q

ECHO Cleaning gwt directories ...
FOR /D /R %TEMP% %%x IN (gwt*) DO RMDIR /S /Q "%%x"

ECHO.
ECHO Done.
PAUSE
于 2017-09-24T21:36:18.233 回答