[IMP] base: improve PDF generation speed for large tables
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>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<root>
|
||||
<table>
|
||||
<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>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>2</td>
|
||||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>3</td>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</root>
|
||||
Reference in New Issue
Block a user