Re: [Xsltforms-support] xsltforms Performance
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2010-02-07 16:22:38
|
Christopher, > After investigating this a bit further, I noticed that the xforms-recalculate event was being called twice--once from XFControl.prototype.valueChanged and again from xforms.closeAction. > I have checked AJAXForms sources and it appears it was already like that. It seems impossible to contact AJAXForms creator so I won't be able to say why there is this double call. > It seems to me that XFControl.prototype.valueChanged does all the leg work so that xforms.closeAction will recalculate and revalidate the instance. Yes, xforms.closeChanges is called to perform the necessary event dispatches when everything is done and I agree that this should be the only place for xforms-recalculate to be dispatched. > By removing the line: > > XMLEvents.dispatch(model, "xforms-recalculate"); > > from XFControl.prototype.valueChanged, The next line: xforms.refresh(); should also be removed for the same reason or it would disturb xforms.closeChanges. > I was able to almost halve the time it takes a user to "tab" from one field to the next. Very interesting indeed because IE is so slow... > Preliminary testing indicates that there are no negative side effects. > > Is there any reason why this cannot be a permanent (albeit partial) fix for this issue? > The SVN version is now integrating your suggestion. My own tests are passed but more are required to be sure... Thanks! -Alain |