Project

General

Profile

Actions

Feature #4188

closed

Consider performance-related patches to Render.

Added by Bruce Toll over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
06/19/2015
Due date:
% Done:

0%

Estimated time:

Description

The Render subsystem does a great job styling and laying out complex documents, though longer documents/tables that take advantage of styling can be somewhat CPU intensive.

For a simple benchmark, I've attached a file report_long.xml.gz, which is based on examples/widgetgallery/approot/report.xml with the table row section repeated an additional 19 times. If it is uncompressed and copied over the existing report.xml, the widgetgallery media/pdf-output page can be used to render it as a PDF (19 pages) and provide rough timing estimates. With an optimized gcc-4.7 build, this takes around 3.2 seconds to render on my laptop running Debian 7.8 (wheezy) with an Intel® Core™ i7-2620M CPU @ 2.70GHz. With a debug build, it takes just over 10 seconds.

Attached for your consideration are two patches that reduce the render times for this document to 1.4 seconds (2.3x faster) for the optimized build and 3.2 seconds (3.1x faster) for the debug build. Of course, the actual improvement will be affected by document complexity and system/compiler differences.

The patched version passes the bundled Wt "test" application and the PDF output for the original report.xml and the report_long.xml matches the unpatched version.

Additional notes are included with the patch files. If I can be of assistance with additional testing or modifications for portability, just let me know.


Files

Actions #1

Updated by Koen Deforche over 9 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
Actions #2

Updated by Koen Deforche over 9 years ago

  • Status changed from InProgress to Resolved
  • Target version set to 3.3.5

Thanks for the patches. They will give trouble to the Java port, but we'll deal with it as the performance gain cannot be ignored.

Actions #3

Updated by Bruce Toll over 9 years ago

Thanks for this. It's very much appreciated.

Actions #4

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF