FastStringMap is not public class

90 views
Skip to first unread message

Andrej Harsani

unread,
Oct 17, 2008, 6:14:32 PM10/17/08
to Google Web Toolkit
Hi,
I want to use FastStringMap instead of HashMap, due to 4x better
performance. I have to copy this class, is there a reason why its
visibility is default?
thanks

kozura

unread,
Oct 17, 2008, 7:16:57 PM10/17/08
to Google Web Toolkit
Only a small subset of the Java library is emulated for use on the
client side; see http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&t=RefJreEmulation.

You can use any library you desire for server-side code, but on the
client everything has to be properly emulated to handle javascript and
browser compatibility issues, so is limited to the above set. The "4x
better performance" might be true in Java, but does not correlate at
all to how it might be implemented in js!

Andrej Harsani

unread,
Oct 17, 2008, 7:52:09 PM10/17/08
to Google Web Toolkit
I'm talking about com.google.gwt.user.client.ui.FastStringMap - class
which is already in GWT...


On Oct 18, 1:16 am, kozura <koz...@gmail.com> wrote:
> Only a small subset of the Java library is emulated for use on the
> client side; seehttp://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&t=RefJ....

rakesh wagh

unread,
Oct 18, 2008, 11:57:10 AM10/18/08
to Google Web Toolkit
u gotta make a copy and change the private to public. Seems to be the
only way for now. Check this thread:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/22c37ad1ba4950fc/d98c8ecb0b33b993?lnk=gst&q=FastStringMap#d98c8ecb0b33b993

Try to avoid string as keys in your hashmaps. We use longs, ints
etc... Default hahsmap implementation for string keys is relatively
slow.

Rakesh Wagh

rakesh wagh

unread,
Oct 18, 2008, 12:02:09 PM10/18/08
to Google Web Toolkit

bc

unread,
Oct 19, 2008, 10:42:11 PM10/19/08
to Google Web Toolkit
There is a great blog post available on this by Damon Lundin. You can
find it here http://development.lombardi.com/?p=95

On Oct 18, 11:02 am, rakesh wagh <rake...@gmail.com> wrote:
> FYI:http://code.google.com/p/google-web-toolkit/issues/detail?id=672&can=...
Reply all
Reply to author
Forward
0 new messages