Monday, August 27, 2007

A week and a half of performance work

I am just back from an exhausting but very productive trip to Scotland and England, where I have been working hard on Orbeon Forms performance:

  • A lot of time was spent timing and profiling quite complex forms used by two of ours customers. We have gained interesting knowledge of where future improvements could be made.

  • We fixed long-standing memory leaks related to the XPath cache, XSLT, and the Scope processors in XPL. You may want to upgrade to a recent nightly, and certainly to the upcoming Orbeon Forms 3.6, just because of that. Thanks to YourKit we identified and fixed the issues quite rapidly.

  • We worked with Mike Kay, of XSLT and Saxon fame, on designing a new XPath dependency system which we plan to use for many UI-related optimizations, and later for XForms model-related optimizations as well. This promises to bring important performance improvements in the future, and that's maybe the most exciting part of this trip. See Mike's related blog entry, which also touches on the use of this system for document projection in XQuery.

  • We have made several optimizations which improve page loading time and memory consumption, including lazy evaluation of XForms controls' properties and improved instance replacement efficiency.

  • We have made progress towards improved caching of XForms documents. This also opens the door to more in-depth analysis of XForms documents, also with promises of future performance improvements.

  • We have confirmed with numbers that it makes sense to only let a limited number of threads at a time enter the Orbeon Forms servlet. This is one of those common sense ideas that keep having to be rediscovered and we'll touch on it in more details in a further post.

There is still a lot to be done regarding performance in Orbeon Forms. The obvious next step is to continue the work on the XPath dependency system now that the ground work has been done.

2 comments:

  1. Have you looked at this paper explaining the implementation of XSmiles engine:
    http://www.actapress.com/PaperInfo.aspx?PaperID=25788

    (Possible to download for varius places, i.e. http://pacificcoast.net/~lightning/XFormsComputes_IASTEDFinalManuscript.htm

    ReplyDelete
  2. Thanks the the link to the paper. The standard XForms dependency algorithm is quite interesting. Its most problematic aspect, I think, is the fact that you can't just use static analysis to implement it: you actually have to perform dynamic analysis. But some day we'll get there.

    Note that in an XForms implementations, there is more to dependencies than just the standard dependency algorithm. For example, dependencies of controls and itemsets on instance data is not tackled at all by the XForms spec. This is actually what we plan to work on first in Orbeon Forms.

    -Erik

    ReplyDelete