Skip to content

Prevent OutOfMemoryError when scaling images #51

@rwi

Description

@rwi

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions