View Full Version : about big generated xxxx.cache.html, >2M
javadou
3 Nov 2008, 1:51 PM
Hi,
I am newcomer about gxt and extjs.
I did a small test which contains a TabPanel which has two tabs. and each tab contains a BorderLayout. To my surprise, the generated .cache.html files are very big (>2M). Therefore, that's slow to visit the site in the first time, which is about 5,6 seconds.
Could you tell me some tricks and articles about how to use gxt in a better way?
thanks,
javadou
gslender
4 Nov 2008, 2:51 AM
I've not seen this - I'm using a lot of widgets (more than what you described) within an app and its only 500K which is reasonable considering most of the library is used.
How about you post an example app so we can compare?
javadou
4 Nov 2008, 6:52 AM
Hi gslender,
thanks,
here it's my source code.
I've not seen this - I'm using a lot of widgets (more than what you described) within an app and its only 500K which is reasonable considering most of the library is used.
How about you post an example app so we can compare?
javadou
4 Nov 2008, 6:56 AM
and here it's the screenshot about compiled files.
I've not seen this - I'm using a lot of widgets (more than what you described) within an app and its only 500K which is reasonable considering most of the library is used.
How about you post an example app so we can compare?
posta07
4 Nov 2008, 8:17 AM
When I build and compile your app, I get the following screen shot...
the *.cache.html files are all smaller than 340KB
Just curious, What versions (GXT and GWT) are you using, and what operating system?
javadou
4 Nov 2008, 8:30 AM
I use windows xp and gwt 1.5.2, crypal studio plugin, gxt 1.1.1.
Is it possible because of crypal studio plugin, which requires tomcat 5 (servlet 2.4)?
By the way, Can I use gwt+gxt in tomcat6?
thanks,
When I build and compile your app, I get the following screen shot...
the *.cache.html files are all smaller than 340KB
Just curious, What versions (GXT and GWT) are you using, and what operating system?
posta07
4 Nov 2008, 8:35 AM
Can I use gwt+gxt in tomcat6?
Yes you can. That is my configuration.
Is it possible because of crypal studio plugin, which requires tomcat 5 (servlet 2.4)?
Try running and compiling your source outside of the cypal studio plugin.
Darrell put a very good step-by-step procedure for setting up your project in Eclipse
(http://extjs.com/helpcenter/index.jsp) that might be of help.
javadou
4 Nov 2008, 8:36 AM
thanks,
I am trying and will be back.
thanks,
Yes you can. That is my configuration.
Try running and compiling your source outside of the cypal studio plugin.
Darrell put a very good step-by-step procedure for setting up your project in Eclipse
(http://extjs.com/helpcenter/index.jsp) that might be of help.
javadou
4 Nov 2008, 12:23 PM
I took out the cypal studio plugin in my eclipse and use gwt+gxt in a Java Project.
The generated html files are much smaller as you did, about 300K. That's perfect for me. thanks a lot, guys.
another question, I used to export the project into a war using cypal studio plugin in the eclipse. And drop the war into tomcat's webapp folder, which is very convinent. If I use Java project like now, do you guys have a easy way to do the deploy? are you using an ant build file? if so, could you share with me?
thanks again,
javadou
thanks,
I am trying and will be back.
thanks,
posta07
4 Nov 2008, 1:12 PM
Yes, I was using ant to handle the building of the war.
Right now I'm using Maven2. I would really recommend Maven, but for simple builds I would use ant.
I have a few scripts you could use, but it's on my other computer /:)
I can attach to this post when I return tomorrow.
Here are the basic steps you'll want to follow:
1. Have a folder where you plan to put everything (like... one named webapp)
2. Compile your Java source with javac and copy class/resource files to webapp/WEB-INF/classes
3. Copy your library files to webapp/WEB-INF/lib
4. Copy your web.xml file in webapp/WEB-INF
5. Compile and copy your GWT/GXT files (*.cache.html... et. al) into the webapp/ directory
6. Zip your webapp dir as a .war file.
Actually, find attached the build.xml file that darrell uses for the samples...
javadou
4 Nov 2008, 1:38 PM
Hi posta07,
thanks alot.
javadou
Yes, I was using ant to handle the building of the war.
Right now I'm using Maven2. I would really recommend Maven, but for simple builds I would use ant.
I have a few scripts you could use, but it's on my other computer /:)
I can attach to this post when I return tomorrow.
Here are the basic steps you'll want to follow:
1. Have a folder where you plan to put everything (like... one named webapp)
2. Compile your Java source with javac and copy class/resource files to webapp/WEB-INF/classes
3. Copy your library files to webapp/WEB-INF/lib
4. Copy your web.xml file in webapp/WEB-INF
5. Compile and copy your GWT/GXT files (*.cache.html... et. al) into the webapp/ directory
6. Zip your webapp dir as a .war file.
Actually, find attached the build.xml file that darrell uses for the samples...
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.