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

Prevent OutOfMemoryError when scaling images #51

Open
rwi opened this issue Mar 27, 2018 · 0 comments
Open

Prevent OutOfMemoryError when scaling images #51

rwi opened this issue Mar 27, 2018 · 0 comments

Comments

@rwi
Copy link
Member

rwi commented Mar 27, 2018

The first 3 images attached to a note will be scaled down to a preview size when the note is rendered. If there are several notes with larger images this can lead to an 'OutOfMemoryError: heap space' because this operation typically requires loading the whole image data into memory.

Measures to prevent this:

  • don't scale images that are larger than a certain configurable size
  • make scaling asynchronous and allow only a configurable number of parallel scale operations
  • let the number of available threads for parallel scaling depend on the size of the images being scaled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant