27 March 2011

From Organic Design wiki
Revision as of 20:17, 27 March 2011 by Nad (talk | contribs) (News: RecordAdmin performance improved)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Warning.svg This is a blog item that needs to be converted to the new Bliki format


RecordAdmin performance improved

One of our clients has some complex record tables which became extremely slow when there were more than 100 rows of data in the resultant set. After analysing the execution of the slow queries it turned out that over 90% of the processing time was in the renderRecords method. The problem was that the initialisation of the wiki parser takes a lot of resource, and it was being initialised once for every cell of data in the table. The problem was fixed (see diff) by breaking the render loop out into two passes, the first to build a single block of wikitext for the whole table with delimiters for columns and rows, and the second to render the table drawing from the pre-parsed cell data rather than calling the wiki parser directly. This has resulted in a massive performance improvement in record table rendering, large tables having more than a hundred rows can now render over fifty times faster!