Friday, March 30, 2012

Re: Quantify GWT Debug module overhead

Jaga,

GWT needs to do UiBinding of HTML elements inserted into the DOM. A paraphrasing of this process is:
  • Made insert a new <X> element into the DOM with a custom id (i.e. gwt_id_E7D8A88).
  • Instantly do a lookup for that id and store the reference so that it is now UI bound.
  • Remove the temporary id.
This means that you see a bunch of tags with no id's when you use a DOM inspector, but they were really used. This is why GWT does not want you to set them.

To get around this you can set the attribute debugId in your UiBinder XML (GWT 2.3 & lower) or set it programmaticly at run time. We use the later so that necessary items can be references by Cucumber without the use of brittle XPaths (slow) that depend on classes (unless you're using GWT CSS obfuscation) and tag types.

Sincerely,
Joseph


--
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/-/5b0nYO8vnYUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment