Skip to content

feat: limit memory usage for previewing large images#2602

Merged
sxyazi merged 4 commits intosxyazi:mainfrom
ze0987:ze0987-yazi-b3q4543
Apr 11, 2025
Merged

feat: limit memory usage for previewing large images#2602
sxyazi merged 4 commits intosxyazi:mainfrom
ze0987:ze0987-yazi-b3q4543

Conversation

@ze0987
Copy link
Contributor

@ze0987 ze0987 commented Apr 10, 2025

Fixes #2598 This limits the memory available to magick, but regardless, magick tries to scale the image anyway and fails. This is very wasteful, therefore it is not a solution.

@ze0987 ze0987 marked this pull request as draft April 10, 2025 18:23
@ze0987 ze0987 closed this Apr 10, 2025
@sxyazi
Copy link
Owner

sxyazi commented Apr 11, 2025

I think this still makes sense, at the very least, it will not result in ImageMagick exhausting the memory and crashing the system, and it can serve as a temporary solution until we find a better way to limit ImageMagick's memory usage, so let's reopen it.

@sxyazi sxyazi reopened this Apr 11, 2025
@sxyazi sxyazi changed the title fix: do not preview huge images by default feat: limit memory usage for previewing large images Apr 11, 2025
@sxyazi sxyazi marked this pull request as ready for review April 11, 2025 05:03
Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sxyazi sxyazi merged commit ca4fe2c into sxyazi:main Apr 11, 2025
6 checks passed
@ze0987 ze0987 deleted the ze0987-yazi-b3q4543 branch April 14, 2025 19:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Large size images

2 participants