how large of your GWT compiled code? My one is 850K

8 views
Skip to first unread message

Edgenius

unread,
Nov 12, 2009, 6:48:02 PM11/12/09
to Google Web Toolkit
I am very excited for code split feature on Gwt 2.0 as the HTML code
size after compiled already bloats to 850k. I give a quick try but it
looks not work like a breeze. I know I have to do more research. I
don't use lots of third party libraries, actually, only 2 libraries:
GWT-DND, GWT-LOG. My GWT client code is about 350 classes.

So, do you have any good practice to reduce code size? Does code split
give you very good result?

Or just tell us what is your compiled code size and how many your
classes...

hazy1

unread,
Nov 13, 2009, 2:14:17 PM11/13/09
to Google Web Toolkit
Our code size, uncompressed is several megabytes. We compress and
cache it (both on the client and on the server - cache the zipped file
in memory). It is not much trouble after doing this.

Dean S. Jones

unread,
Nov 13, 2009, 9:26:40 PM11/13/09
to Google Web Toolkit
850k is nothing, it's the size of many images or photo's, as hazy1
said, compression will reduce the size dramatically,
( I moved compression from the app server to my fronting Apache and
it's much more efficient )
and you can also set the expires header on the GWT html/js to some
future date ( a week or month )
( but do not set it on files that contain .nocache. )

once my app is loaded and cached properly, it's up on the screen with
all the required RPC traffic
amounting to a a total network xfer of only 4k!!! ( as reported by
firebug )

rjcarr

unread,
Nov 14, 2009, 3:50:41 PM11/14/09
to Google Web Toolkit
I have (what I think is) a rather large application and the main files
are about 400KB (remember, only 1 is loaded). My browser reports that
these files are down to 100K when gzip compressed over the wire.
That's the equivalent of one large image ... not too bad in my
opinion.

Content-Encoding:gzip
Content-Length:109967

Edgenius

unread,
Nov 15, 2009, 10:35:05 PM11/15/09
to Google Web Toolkit
It looks no one care about initial loading performance. My project
single HTML is 850k, after gzip is about 200k. OK, maybe I am too
critical....

luisfpg

unread,
Nov 16, 2009, 6:08:25 AM11/16/09
to Google Web Toolkit
Our app is still 60-70% complete and already has 2.1MiB of obfuscated
code. Pretty code is 14+MiB.
However we've developed several components and widgets, and we have a
lot of RemoteServices wich several (and sometimes complex) model
classes, which are transmitted over the wire.
We will still further investigate the GWT 2.0's runAsync(), which
should make things better.
Gzipping is also a must.
Just to point out, someone said that changing collection interfaces to
implementations (i.e.: List to ArrayList) in remote services /
serializable classes would reduce the code size. We tried it, and
reduced 100k. Not to ignore, but would make the code largely
unmaintainable, so we won't do it.
Any further tips on reducing code size would be nice.
--
Luis Fernando Planella Gonzalez

Bakul

unread,
Nov 16, 2009, 9:19:00 AM11/16/09
to Google Web Toolkit
Hi,

Our app, 50 -55 % done so far, for one browser is nearly 1.6 MB
without gzip. And it has nearly 70 -80 RPC calls.

Luis, Question for you:
As you said your app is 2.1 MB of obfuscated, how is the preformance
and does it has any issue?

Question to all:
What is the max size that of GWT one module that a browser can handle
without any issue, specially IE 6, in our case :-( ?

Thanks,
Bakul.

Luis Fernando Planella Gonzalez

unread,
Dec 9, 2009, 7:39:54 AM12/9/09
to Google Web Toolkit
Sorry for taking so long to answer, but I haven't seen your post
before.
We haven't yet done any larger performance test, but it is very
acceptable.
Yesterday, in a first no-brainer attempt of GWT.runAsync(), I've
managed to get a 650K initial download and then a separate file per
module (for now, modules varies from few K to 180K).
I'll still try to reduce both the initial download and the modules.
It does takes more time to compile now. That's an issue to me as I
can't use the built-in server: we use EJB, so there's an external
server. Whenever anything changes in RPC (params, methods, even
classes) we need to recompile :-/
I still didn't implement gzip compression, but hope things can get
much better...
Ah, about IE6: as our app is targeted to late 2010, we won't support
IE6 \o/
--
Luis Fernando Planella Gonzalez

Reply all
Reply to author
Forward
0 new messages