I am not JS developer but I am trying to understand the way the java code converted to JS by GWT compiler do find the cause of memory increase in our large application .
Some time i see some variable with assigened to ” _ ” for example
_ = com_google_gwt_event_shared_GwtEvent.prototype = new java_lang_Object;
These kind of assignments are in many place in the code . What does it means ?
The GWT compiler models the Java type hierarchy using JavaScript prototype chains. The
_symbol is used as a global temporary variable by the compiler and short JSNI methods. In the top scope of the generated script, you should see something likeWhere you see methods that have a
this$staticparameter, the compiler has deduced that the Java expressioninstance.someOtherMethod()is not polymorphic (possibly via type-tightening) and avoids the overhead of the intermediate symbol lookup at runtime.