Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT DevMode filling up tmp directory

Tags:

gwt

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.

like image 388
sof Avatar asked Aug 25 '13 09:08

sof


2 Answers

1GB is too much for development purposes. The only reason I can think of is that you have set a lot of permutations in your .gwt.xml file. You should reduce the number of permutations during development to the minimum ( only include the specs you are using). You can use the DevGuideCompileReport to locate the problem.

Edit:

The common issue has been reported by other users. It has to do with the eclipse plugin not deleting the temp files correctly. The issue has been reported and had a lot of attention from GWT users, but no concrete patch has been released. The workarounds were to manually delete the files or to write a script to do the work for you:

google-plugin-for-eclipse-issue74

like image 122
Vjeetje Avatar answered Oct 26 '22 11:10

Vjeetje


Here's a windows batch script to clean up after GWT:

@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
like image 23
Craigo Avatar answered Oct 26 '22 09:10

Craigo