Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improving generation performances #456

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

meritel
Copy link

@meritel meritel commented Mar 4, 2019

Because Html2Pdf loop through html elements, and creates a lot of sub elements, each time a sub element is cleared, a complete scan of /tmp/ dir was made to delete temp files.
These modifs allow to make only ONE scan in /tmp/ dir, at the end of generation, to delete temp files.

meritel added 2 commits March 4, 2019 11:03
Because Html2Pdf loop through html elements, and creates a lot of sub elements, each time a sub element is cleared, a complete scan of /tmp/ dir was made to delete temp files.
These modifs allow to make only ONE scan in /tmp/ dir, at the end of generation, to delete temp files.
@MyPDF => create a getFileId function to access to the private $tcpdf->file_id
@html2pdf => use the getFileId() to delete tmp files of this instance of Html2Pdf
static protected $_tables = array(); // static table to prepare the nested html tables
static protected $_subobj = null; // object html2pdf prepared in order to accelerate the creation of sub html2pdf
static protected $_tables = array(); // static table to prepare the nested html tables
static protected $_tmpFilesAreCleaned = false; // flag : file cleaning is done
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there are some additional white spaces here.

Comment on lines +112 to +114
* Get the private variable file_id, for cleaning tmp files
* @access public
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The * should be in line, but different amounts of white spaces are used for each line.

@k00ni k00ni mentioned this pull request Aug 5, 2020
@numerogeek
Copy link

Can someone merge this please ? @k00ni

@k00ni
Copy link

k00ni commented Aug 20, 2020

I am sorry, I can't. Just wanted to help by making a review.

@numerogeek
Copy link

ping @spipu ? I have a performance problem since I upgraded. Thx 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants