Long table causing memory/timeout errors
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 11.2k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Original author: mattl (July 24, 2012 21:35:46)
Steps:
Use the attached HTML (grouped_report.html) with the following PHP:
<code language="php">
...
$dompdf->load_html( $html );
$dompdf->set_paper( 'letter', 'landscape' );
$dompdf->render();
$dompdf->stream( "report.pdf", array( 'Attachment' => 0 ) );
</code>
The divided_report is placing 29 rows in a table and each table is page-break-after:always. The grouped_report has all of them in one table and it doesn't work.
Expected:
The fully rendered report.
Actual:
Variations on 30sec max execution time exceeded, tried to allocate more memory errors
Environment:
PHP 5.3.x on Apache 2.2 using PDFLib and dompdf @ r495.
Original issue: http://code.google.com/p/dompdf/issues/detail?id=522
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached grouped_report.txt and divided_report.txt, then reproduce the issue through load_html(), set_paper(), render(), and stream() using the provided PHP example. Compare the single 29-row table with the page-broken version and inspect where rendering exceeds the memory or execution limits. Done means the grouped report renders fully without timeout or memory errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100