Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...), User repository (AUR), Compiled from source
Operating System type and version
Arch Linux, Linux 6.6.2, X11, KDE Plasma 5.27.9, NVIDIA
Description
I've noticed the performance of running flameshot gui isn't ideal as it doesn't appear to forward the request to the existing Flameshot instance, and rather spawns an entirely new instance, which I guess is what you'd expect if you run flameshot, but it's not ideal when you've bound that command to a keybind and execute it regularly. It usually causes lag in games as well right before the instance is able to initialize.
I made a change to Flameshot in PR #3408 and found it drastically improves performance. I measured the initialization time by adding qputenv("FLAMESHOT_INIT_TIME", QByteArray::number(QDateTime::currentMSecsSinceEpoch())); to the first line of main(), and in the DBus adapter function and measured the difference after the widget initializes, perhaps there's a better way to measure it but I think it demonstrates the difference.
I measured 350-420ms for flameshot gui and 20-70ms for the DBus function.
Steps to reproduce
Run flameshot gui and notice the initialization time.
Screenshots or screen recordings
DBus in game frametime:
flameshot gui in game frametime:
(KDE Compositor was disabled for in game demonstration)
System Information
Arch Linux, Linux 6.6.2, X11, KDE Plasma 5.27.9, NVIDIA
Flameshot Version
v12.1.0, f0430e0
Installation Type
Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...), User repository (AUR), Compiled from source
Operating System type and version
Arch Linux, Linux 6.6.2, X11, KDE Plasma 5.27.9, NVIDIA
Description
I've noticed the performance of running
flameshot gui
isn't ideal as it doesn't appear to forward the request to the existing Flameshot instance, and rather spawns an entirely new instance, which I guess is what you'd expect if you runflameshot
, but it's not ideal when you've bound that command to a keybind and execute it regularly. It usually causes lag in games as well right before the instance is able to initialize.I made a change to Flameshot in PR #3408 and found it drastically improves performance. I measured the initialization time by adding
qputenv("FLAMESHOT_INIT_TIME", QByteArray::number(QDateTime::currentMSecsSinceEpoch()));
to the first line of main(), and in the DBus adapter function and measured the difference after the widget initializes, perhaps there's a better way to measure it but I think it demonstrates the difference.I measured 350-420ms for
flameshot gui
and 20-70ms for the DBus function.Steps to reproduce
flameshot gui
and notice the initialization time.Screenshots or screen recordings
DBus in game frametime:![Screenshot with DBus alternative](https://i.troplo.com/i/0ea6ee11d806.png)
flameshot gui
in game frametime:(KDE Compositor was disabled for in game demonstration)
System Information