This commit addresses performance issues when generating PDFs with large tables using wkhtmltopdf. Processing time for such tables grows exponentially with rows, causing significant delays. Testing revealed a PDF with 250,000 rows took about an hour. Previously, a workaround involving special XML template was provided to users, inserting </table><table> tags every 500 rows. This commit introduces a general solution at framework level. Now, tables with >500 rows will automatically use this workaround, enhancing PDF generation speed. The number 500 is taken from opw-1689673 and seems to be a good compromise between the number of split in tables and the processing time by wkhtmltopdf closes odoo/odoo#131933 Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
19 lines
376 B
XML
19 lines
376 B
XML
<root>
|
|
<table id="cool-table" class="fancy-style">
|
|
<tr>
|
|
<td>1</td>
|
|
<td>1</td>
|
|
<td>1</td>
|
|
</tr>
|
|
</table>
|
|
<table id="cool-table" class="fancy-style">
|
|
<tr>
|
|
<td>
|
|
<td>2</td>
|
|
<td>2</td>
|
|
<td>2</td>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</root>
|