Add page cache option to save memory
Running example_067.php with and without the cache enabled uses about 26MB without vs 17MB with the cache.
This adds the usePageCacheFile option which allow you to move page data to a temporary file when not in use.
Thanks for reviewing it, @williamdes! I think I got all the changes in and updated all the ifs.
@williamdes, I assume someone else will merge this at some point, right? I don't seem to have permission.
@williamdes, I assume someone else will merge this at some point, right? I don't seem to have permission.
Yes, when Nicolas will have some time he will probably review this :) Now we need to be patient
Sounds good. Thank you.
I rebased this to fix the merge conflicts with the examples.
Codecov Report
Attention: 15 lines in your changes are missing coverage. Please review.
Comparison is base (
5fce932) 69.28% compared to head (f186d90) 72.96%.
Additional details and impacted files
@@ Coverage Diff @@
## main #474 +/- ##
==========================================
+ Coverage 69.28% 72.96% +3.68%
==========================================
Files 128 129 +1
Lines 26961 21974 -4987
==========================================
- Hits 18679 16034 -2645
+ Misses 8282 5940 -2342
| Flag | Coverage Δ | |
|---|---|---|
| php-5.3-ubuntu-latest | ? |
|
| php-5.4-ubuntu-latest | ? |
|
| php-5.5-ubuntu-latest | ? |
|
| php-5.6-ubuntu-latest | ? |
|
| php-7.0-ubuntu-latest | ? |
|
| php-8.3-ubuntu-latest | 72.96% <84.53%> (?) |
|
| php-nightly-ubuntu-latest | 72.96% <84.53%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| examples/example_068.php | 100.00% <100.00%> (ø) |
|
| include/tcpdf_page_cache_reference_counts.php | 100.00% <100.00%> (ø) |
|
| tcpdf.php | 71.69% <70.58%> (+3.77%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I also updated this so it passes the unit tests, including on PHP 5.3.
I also updated this so it passes the unit tests, including on PHP 5.3.
Thank you ! We will have to wait on @nicolaasuni to a review