Skip to content

Improve the speed of calling grim #3859

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lhz07
Copy link

@lhz07 lhz07 commented Mar 4, 2025

When the output file is specified in the "ppm" format, Grim can operate more efficiently. Additionally, loading a pixmap from a file is significantly faster than retrieving it from standard output. In my test, this optimization can reduce the time by approximately 150 milliseconds.

old method:
old_method
new method:
new_method

Already tested this change on archlinux with hyprland.

@lhz07
Copy link
Author

lhz07 commented Mar 8, 2025

@mmahmoudian hi, looks like you're the most active maintainer... would you mind giving this a review?

@cybergrind
Copy link

It works. Still not perfect but way faster.
Around 400-500ms faster than before.

Environment: Linux, hyprland

Possibly could also help with:
#3039

@mmahmoudian mmahmoudian added this to the v13 milestone Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants