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

improve how PDFHandler caches single page of pdf #93

Open
Tracked by #91
bosd opened this issue Aug 28, 2024 · 1 comment
Open
Tracked by #91

improve how PDFHandler caches single page of pdf #93

bosd opened this issue Aug 28, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed performance Performance

Comments

@bosd
Copy link
Collaborator

bosd commented Aug 28, 2024

Accross the repos the where some PR's about for the usage of tempfiles.

From: camelot-dev#487

Change the way to share and clean up temp directory.

The WITH clause is contagious. Temp directory cannot be shared across an instance of PDFHandler unless the signature of init is changed. It turns the upper layer's duty to clean up the directory. To hide the implementation details, use finalizers to clean up.

Add _get_temp_path to make sure to access tmp pdf file in the same way.

Hide implementation details. We can reuse the temp pdf after calling parse() now.

Update _save_page parameters to meet the change.

Use properties instead.

@bosd bosd added bug Something isn't working enhancement New feature or request labels Aug 28, 2024
@bosd bosd mentioned this issue Aug 28, 2024
25 tasks
@bosd bosd added the performance Performance label Aug 28, 2024
@bosd bosd added the help wanted Extra attention is needed label Nov 2, 2024
@bosd
Copy link
Collaborator Author

bosd commented Nov 10, 2024

Made some tests to forward port that pr.
The downside of the fix is that the temp folder is actually cleanup.
So it is unavailable for plotting. Resulting in the plotting tests to fail.

Someone alternative idead/ suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed performance Performance
Projects
None yet
Development

No branches or pull requests

1 participant