Slow iteration through a JSONArray in GWT Slow iteration through a JSONArray in GWT json json

Slow iteration through a JSONArray in GWT


Have you tried using overlays?

GWT Coding Basics - JavaScript Overlay Types

You can create overlay types pretty easily:-

// An overlay typeclass Customer extends JavaScriptObject {  // Overlay types always have protected, zero-arg ctors  protected Customer() { }  // Typically, methods on overlay types are JSNI  public final native String getFirstName() /*-{ return this.FirstName; }-*/;  public final native String getLastName()  /*-{ return this.LastName;  }-*/;  // Note, though, that methods aren't required to be JSNI  public final String getFullName() {    return getFirstName() + " " + getLastName();  }}

Very easy to use and I think would be much faster than using JSONObject objects.


How do you use GWT ? Inside an IDE ?In my experience, having too many breakpoints slows down the execution flow, may be you could check that ?Particularly when I see that in production it seems fine...


If everything else fails, you can always write that in native Javascript and call it via JSNI.