David Chandler's Journal of Java Web and Mobile Development

  • David M. Chandler

    Web app developer since 1994 and Google Cloud Platform Instructor now residing in Colorado. Besides tech, I enjoy landscape photography and share my work at ColoradoPhoto.gallery.

  • Subscribe

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 223 other followers

  • Sleepless Nights…

    July 2011
    S M T W T F S
  • Blog Stats

    • 1,029,258 hits

GWT performance tip: watch out for String.split()

Posted by David Chandler on July 12, 2011

GWT benchmarking inside Google shows that due to intentional emulation of the differences between Java and JS regex, GWT’s emulated implementation of String.split() is about an order of magnitude slower than the native split on all browsers. On Chrome, it can be up to 1000x slower (6000 ms vs. 6 ms) if the strings are large enough (>1 MB in benchmark testing). This isn’t likely to be noticeable in many real-world applications, but if you happen to be doing a lot of String manipulation in GWT, you should consider using JS native methods instead.

One Response to “GWT performance tip: watch out for String.split()”

  1. […] https://turbomanage.wordpress.com/2011/07/12/gwt-performance-tip-watch-out-for-string-split/ […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: