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
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: