S
Sangeeta
Main statement:
Javascript functions are slow inside an IFRAME
Additional description:
Javascript has an event called onload(). This event fires when the
page is fully painted. In BranchNet IFRAME, this event is called up to
15 seconds after the page is painted. In JQuery, the equivalent event
is called JQuery.ready(). Even this event is firing too slow – up to
25 seconds after the page is painted.
Trials conducted:
Reduce size of JavaScript (compression).
Currently this is about 500 kB – reduced to 200 kB, but no change in
tests.
Change order of initialization.
There are multiple steps in initialization: (a) render all reflexive
formula snippets, (b) render all error highlight snippets, (c) render
all warning highlight snippets, (d) render button/text focus snippets,
(e) render all CSS.
The trial was to change order of (a) – (e) to tweak how the user
experiences (whether controls hide first or do they highlight first,
etc.)
Constraints:
These steps are done after the page is rendered to prevent JavaScript
to run too soon (JavaScript fails if it executes before controls are
rendered – in forums they call this as ‘before DOM tree is ready’).
The attempt is to find the point at which it is not too soon but not
too late either.
If it is too late, the problem is encountered in Fulfillment page
where the user can entering data, but the reflexivity takes effect
later causing them to lose data.
Javascript functions are slow inside an IFRAME
Additional description:
Javascript has an event called onload(). This event fires when the
page is fully painted. In BranchNet IFRAME, this event is called up to
15 seconds after the page is painted. In JQuery, the equivalent event
is called JQuery.ready(). Even this event is firing too slow – up to
25 seconds after the page is painted.
Trials conducted:
Reduce size of JavaScript (compression).
Currently this is about 500 kB – reduced to 200 kB, but no change in
tests.
Change order of initialization.
There are multiple steps in initialization: (a) render all reflexive
formula snippets, (b) render all error highlight snippets, (c) render
all warning highlight snippets, (d) render button/text focus snippets,
(e) render all CSS.
The trial was to change order of (a) – (e) to tweak how the user
experiences (whether controls hide first or do they highlight first,
etc.)
Constraints:
These steps are done after the page is rendered to prevent JavaScript
to run too soon (JavaScript fails if it executes before controls are
rendered – in forums they call this as ‘before DOM tree is ready’).
The attempt is to find the point at which it is not too soon but not
too late either.
If it is too late, the problem is encountered in Fulfillment page
where the user can entering data, but the reflexivity takes effect
later causing them to lose data.