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>
47 lines
1.0 KiB
XML
47 lines
1.0 KiB
XML
<root>
|
|
<table>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>1</td>
|
|
<td>1</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2</td>
|
|
<td>2</td>
|
|
<td>2</td>
|
|
</tr>
|
|
</table>
|
|
<table>
|
|
<tr>
|
|
<td>3</td>
|
|
<td>3</td>
|
|
<td>3</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<td>4</td>
|
|
<td>4</td>
|
|
<td>4</td>
|
|
</tr>
|
|
<tr>
|
|
<td>5</td>
|
|
<td>5</td>
|
|
<td>5</td>
|
|
</tr>
|
|
</table>
|
|
<table>
|
|
<tr>
|
|
<td>6</td>
|
|
<td>6</td>
|
|
<td>6</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td>7</td>
|
|
<td>7</td>
|
|
</tr>
|
|
</table>
|
|
</root>
|