Table Rendering Performance Issue - Upgrade to MigraDoc 1.5.x ?
We have been using PdfSharpCore and MigraDocCore in particular for a recent project. Unfortunately we have been running into some serious performance issues with generating large tables (e.g. 4000 pages full of tables). This scenario might very well take over an hour to complete.
After a lot of research we have found that this issue is known and was apparently fixed by the creators in MigraDoc v. 1.5. Unfortunately this project is still using a ported version of MigraDoc v. 1.32. Are there any plans to upgrade to a more recent version of MigraDoc to fix the above issue with table rendering performance among others ?
Side node: Huge thanks to you from our company, as you have saved us a lot of time and probably also frustration :) Cheers!
I have no immediate plans, as I don't use this library. But you can always send a pull request. All you need to do is look what changed between 1.32 and 1.5 and merge those changes, then send a pull-request. I'll be happy to merge it.
@Jan1902 , not sure if this is still an active issue, I imported the migradoc 1.5 changes into this codebase. I'm interested in maybe how many rows/columns you had in your 4000 page report, to create a valid load test.
At the moment I have a test with 10 columns x 10,000 rows and I can see the time ramps up non linearly. This comes out to approx 150 pages.
I only have basic benchmarks, but I can already see that table size and performance are not linear.
| Method | RowCount | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|
| BigTables | 1000 | 594.3 ms | 24.47 ms | 16.19 ms | 20000.0000 | 9000.0000 | 3000.0000 | 294 MB |
| BigTables | 5000 | 7,935.4 ms | 116.88 ms | 77.31 ms | 92000.0000 | 58000.0000 | 4000.0000 | 1,486 MB |
| BigTables | 10000 | 34,182.9 ms | 287.02 ms | 150.12 ms | 183000.0000 | 65000.0000 | 4000.0000 | 3,014 MB |
The changes in 1.5 may improve the performance slightly, but I think there may need to be some work done on the the TableRender methods that are hotpaths to see significant changes in performance.