Re: [Xsltforms-support] xsltforms Performance
Brought to you by:
alain-couthures
From: Christopher D. <cd...@vi...> - 2010-02-03 14:38:13
|
Alain, I have a follow-up and possibly a partial solution to this issue. However, I would like your feedback. My largest issue is the number of seconds it takes a user to "tab" from one field to the next in my form. As you probably saw, my form has several unique characteristics: . very large instance data . several hundred inputs . nested repeats (3 levels deep) After doing some profiling in IE, I noticed that the xmlValue and ExprContext functions are the biggest offenders in both number of calls and execution time. 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. It seems to me that XFControl.prototype.valueChanged does all the leg work so that xforms.closeAction will recalculate and revalidate the instance. By removing the line: XMLEvents.dispatch(model, "xforms-recalculate"); from XFControl.prototype.valueChanged, I was able to almost halve the time it takes a user to "tab" from one field to the next. 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? Regards, Chris From: COUTHURES Alain [mailto:ala...@ag...] Sent: Saturday, January 23, 2010 11:16 AM To: Christopher Dedels Cc: xsl...@li... Subject: Re: [Xsltforms-support] xsltforms Performance Christopher, I have been using xsltforms to create some complicated interfaces. xsltforms performance appears to degrade significantly as the size of the instance data increases. It does not seem to be impacted as significantly by the number of input controls on the page. This means that paging the items in my repeat element has almost no performance impact. Can you send me a link or the XForms document itself with its data ? Profiling tools report at least 13 seconds in IE 8 (2.5 seconds in FF/Chrome) Yes, IE is still very slower... to "tab" from one field to the next, regardless of whether the data in the field was changed. It's a good situation to check with a javascript debugger (focus is lost,...). As you can expect, this is not acceptable for my users. There are different possibilities of optimization in XSLTForms: less generated HTML elements, less Javascript instructions executed,... Because this has not been done yet, I hope that a minimal effort could improve it significantly. What are the scalability limits of xsltforms? This is not yet determined but there are many parameters involved: complexity, instance size, number of bindings, ... Do you have any suggestions on how to improve performance in my xforms document? Use of // in XPath expressions is surely to avoid. -Alain |