1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    7
    Vote Rating
    0
    javadou is on a distinguished road

      0  

    Question about big generated xxxx.cache.html, >2M

    about big generated xxxx.cache.html, >2M


    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

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    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?

  3. #3
    Ext User
    Join Date
    Aug 2008
    Posts
    7
    Vote Rating
    0
    javadou is on a distinguished road

      0  

    Default


    Hi gslender,

    thanks,
    here it's my source code.

    Quote Originally Posted by gslender View Post
    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?
    Attached Files

  4. #4
    Ext User
    Join Date
    Aug 2008
    Posts
    7
    Vote Rating
    0
    javadou is on a distinguished road

      0  

    Default


    and here it's the screenshot about compiled files.

    Quote Originally Posted by gslender View Post
    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?
    Attached Images

  5. #5
    Ext User
    Join Date
    May 2008
    Location
    Phoenix, AZ
    Posts
    223
    Vote Rating
    0
    posta07 is on a distinguished road

      0  

    Default


    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?
    Attached Images

  6. #6
    Ext User
    Join Date
    Aug 2008
    Posts
    7
    Vote Rating
    0
    javadou is on a distinguished road

      0  

    Default


    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,

    Quote Originally Posted by posta07 View Post
    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?

  7. #7
    Ext User
    Join Date
    May 2008
    Location
    Phoenix, AZ
    Posts
    223
    Vote Rating
    0
    posta07 is on a distinguished road

      0  

    Default


    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.

  8. #8
    Ext User
    Join Date
    Aug 2008
    Posts
    7
    Vote Rating
    0
    javadou is on a distinguished road

      0  

    Default


    thanks,
    I am trying and will be back.

    thanks,

    Quote Originally Posted by posta07 View Post
    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.

  9. #9
    Ext User
    Join Date
    Aug 2008
    Posts
    7
    Vote Rating
    0
    javadou is on a distinguished road

      0  

    Default


    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

    Quote Originally Posted by javadou View Post
    thanks,
    I am trying and will be back.

    thanks,

  10. #10
    Ext User
    Join Date
    May 2008
    Location
    Phoenix, AZ
    Posts
    223
    Vote Rating
    0
    posta07 is on a distinguished road

      0  

    Default


    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...
    Attached Files

Thread Participants: 2