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

imagePlaceholder() creates objects that remain in memory #10332

Closed
hjelmevold opened this issue Nov 14, 2023 · 1 comment · Fixed by #10333
Closed

imagePlaceholder() creates objects that remain in memory #10332

hjelmevold opened this issue Nov 14, 2023 · 1 comment · Fixed by #10333
Assignees
Labels
Milestone

Comments

@hjelmevold
Copy link
Member

If a significant amount of calls are made to a controller code that executes the following line:

portalLib.imagePlaceholder({width: 1500, height: 1500})

…the Java Heap fills up with 9MB large objects that remain in memory, eventually causing lots of Garbage Collection and high server load.

@hjelmevold hjelmevold added the Bug label Nov 14, 2023
@hjelmevold hjelmevold changed the title createImagePlaceholder() creates objects that remain in memory imagePlaceholder() creates objects that remain in memory Nov 14, 2023
@rymsha rymsha added this to the 7.14.0 milestone Nov 15, 2023
@rymsha
Copy link
Contributor

rymsha commented Nov 15, 2023

Fix is to use direct PNG creation - without creation of BufferedImage (which was 9MiB in this case). It saves memory and also a bit more performant.

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

Successfully merging a pull request may close this issue.

2 participants