gwt-servlet.jar size 200KB to 4MB?

138 views
Skip to first unread message

Craig Mitchell

unread,
Jun 29, 2011, 2:02:56 AM6/29/11
to google-we...@googlegroups.com
I've been noticing that the size of the gwt-servlet.jar keep growing.

In version 1.1 it was around 200KB, and now it's over 4MB.

I realize most people could care less, however, it matters for my little project.

I thought the gwt-servlet.jar only contained information for RPCs.  I tried just using the old gwt-servlet.jar, and it worked!  However, I'm nervious that something, somehere, will break.  Anyone care to hazard a guess as to why it has grown to over 4MB?

Cheers.

Thomas Broyer

unread,
Jun 29, 2011, 4:26:41 AM6/29/11
to google-we...@googlegroups.com
gwt-user keep growing, and with features that can be used on the server side: SafeHtml, I18N, RegExp, and of course RequestFactory.
gwt-servlet contains almost everything from gwt-user (except for "rebind" classes, "super" source, and the source code), not just server-side code. I do agree it's "unfortunate". If I were you, I'd rather try to "patch" the gwt-servlet to remove unneeded classes (e.g. remove everything **/client/** except for the RemoteService interface and friends), than to use an older one (reasons: protocol changes, security, performance, etc.). The rule of thumb is that you should always use the same gwt-servlet version as the GWT SDK you compiled your client code with.

Craig Mitchell

unread,
Jun 29, 2011, 4:45:55 AM6/29/11
to google-we...@googlegroups.com
Thanks Thomas.  I'll give patching the correct version a go.  I can see some obvious ones that I wouldn't think need to be in there, like "dom", "editor", and "uibinder".

David Chandler

unread,
Jun 29, 2011, 8:50:54 AM6/29/11
to google-we...@googlegroups.com
FYI, if you're using RequestFactory only and build from source, you'll find build/lib/requestfactory-server.jar (468k), which you can use in place of gwt-servlet.jar.

/dmc

On Wed, Jun 29, 2011 at 4:45 AM, Craig Mitchell <crai...@gmail.com> wrote:
Thanks Thomas.  I'll give patching the correct version a go.  I can see some obvious ones that I wouldn't think need to be in there, like "dom", "editor", and "uibinder".

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/KF9R-Uqe7zkJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

Thomas Broyer

unread,
Jun 29, 2011, 10:25:10 AM6/29/11
to google-we...@googlegroups.com
As you're talking about it: is it planned to publish it as a Maven artifact along with GWT 2.4? And if so, do you know already which groupId and artifactId it will use?

(and talking about Maven, I suppose you have scripts to prepare the deployments, and pom.xml files; what's the reason for them not being in the source repository? it would make life a bit easier to us, people building from source)

David Chandler

unread,
Jun 29, 2011, 1:36:56 PM6/29/11
to google-we...@googlegroups.com
Good point, Thomas. Agreed, the POMs should be part of the open source project, and community participation is welcome. I'll work on getting them checked in.

As for the group/artifact IDs, I expect we'll want to use groupId com.google.web.bindery with artifacts requestfactory-server and requestfactory-client. I'll double-check to make sure there are no GWT references in the jars, but I'm sure that was the intent of moving to com.google.web.bindery. Does this make sense?

/dmc

On Wed, Jun 29, 2011 at 10:25 AM, Thomas Broyer <t.br...@gmail.com> wrote:
As you're talking about it: is it planned to publish it as a Maven artifact along with GWT 2.4? And if so, do you know already which groupId and artifactId it will use?

(and talking about Maven, I suppose you have scripts to prepare the deployments, and pom.xml files; what's the reason for them not being in the source repository? it would make life a bit easier to us, people building from source)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
David Chandler
Developer Programs Engineer, GWT+GAE

Thomas Broyer

unread,
Jun 29, 2011, 2:53:56 PM6/29/11
to google-we...@googlegroups.com


On Wednesday, June 29, 2011 7:36:56 PM UTC+2, David Chandler (Google) wrote:
Good point, Thomas. Agreed, the POMs should be part of the open source project, and community participation is welcome. I'll work on getting them checked in.

Great!
 
As for the group/artifact IDs, I expect we'll want to use groupId com.google.web.bindery with artifacts requestfactory-server and requestfactory-client. I'll double-check to make sure there are no GWT references in the jars, but I'm sure that was the intent of moving to com.google.web.bindery. Does this make sense?

Yep, either that, or com.google.web.bindery.requestfactory if you expect non-requestfactory things to come in later in the "bindery" namespace.

Craig Mitchell

unread,
Jul 4, 2011, 5:34:47 AM7/4/11
to google-we...@googlegroups.com
After realizing that JNLP tricked me (the big gwt-servlet.jar was still being included), it turns out that the old small gwt-servlet.jar doesn't work.

I tried Thomas's idea to cut down the correct version gwt-servlet.jar, however, I really didn't know what I could and couldn't cut, and I cut something that I shouldn't have, and it failed.

Finally I tried Davids idea and built from source to get the requestfactory-server.jar.  Turns out that the server needs com/google/gwt/user/client/rpc/RemoteService which isn't in there.  It also isn't in requestfactory-client.jar either.  The only place I can find it is in gwt-servlet.jar.

Is there not a jar file with just the RPC stuff somewhere?

Craig Mitchell

unread,
Jul 7, 2011, 1:23:45 AM7/7/11
to google-we...@googlegroups.com
After a lot of trial and error.  I have now built a new jar file so my RPCs work (without needing gwt-servlet.jar).  If anyone wants to do the same, these are the directories I included to get it to work (all directories were sourced from gwt-servlet.jar):

├───com
│   └───google
│       └───gwt
│           ├───core
│           │   └───client
│           │       ├───impl
│           │       └───prefetch
│           └───user
│               ├───client
│               │   └───rpc
│               │       ├───core
│               │       │   └───java
│               │       │       ├───lang
│               │       │       ├───math
│               │       │       ├───sql
│               │       │       └───util
│               │       │           └───logging
│               │       └───impl
│               └───server
│                   └───rpc
│                       └───impl
└───META-INF

*phew* ...and the final signed jar is only 272KB!

*** Disclaimer *** It worked for my RPC stuff, but I have no clue if it is all the RPC stuff, and on the flip side, there is probably more I could cut out.
Reply all
Reply to author
Forward
0 new messages