khimaros / smart-auto-move

Smart Auto Move learns the size and position of your application windows and restores them to the correct place on subsequent launches. Supports Wayland.
https://extensions.gnome.org/extension/4736/smart-auto-move/
GNU General Public License v3.0
79 stars 4 forks source link

Laggy desktop when extension is enabled #49

Closed ChrisLauinger77 closed 2 months ago

ChrisLauinger77 commented 2 months ago

Today I got the update from EGO which supports GNOME 45/46. There is already a comment on EGO: Bildschirmfoto vom 2024-04-22 20-57-19

When I enable debuglog the extension cyclicly spams the log with messages. Video playback lags as well as playing games. Every 1-2s it video / frames stutter.

Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() christian@debian:~ false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Erweiterungen false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Smart Auto Move true 4
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() null true 15
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Bildschirmfotos false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() conky (debian) true 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Steam false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() ESL_DOTA2 - Dota 2 - LIVE: Xtreme Gaming vs. OG Esports - ESL One Birmingham 2024 - Group B - VLC media player false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Laggy desktop when extension is enabled · Issue #49 · khimaros/smart-auto-move – Mozilla Firefox false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() christian@debian:~ false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Erweiterungen false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Smart Auto Move true 4
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() null true 15
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Bildschirmfotos false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() conky (debian) true 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Steam false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() ESL_DOTA2 - Dota 2 - LIVE: Xtreme Gaming vs. OG Esports - ESL One Birmingham 2024 - Group B - VLC media player false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Laggy desktop when extension is enabled · Issue #49 · khimaros/smart-auto-move – Mozilla Firefox false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() christian@debian:~ false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Erweiterungen false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Smart Auto Move true 4
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() null true 15
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Bildschirmfotos false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() conky (debian) true 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Steam false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() ESL_DOTA2 - Dota 2 - LIVE: Xtreme Gaming vs. OG Esports - ESL One Birmingham 2024 - Group B - VLC media player false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Laggy desktop when extension is enabled · Issue #49 · khimaros/smart-auto-move – Mozilla Firefox false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() christian@debian:~ false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Erweiterungen false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Smart Auto Move true 4
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() null true 15
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Bildschirmfotos false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() conky (debian) true 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Steam false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() ESL_DOTA2 - Dota 2 - LIVE: Xtreme Gaming vs. OG Esports - ESL One Birmingham 2024 - Group B - VLC media player false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() Laggy desktop when extension is enabled · Issue #49 · khimaros/smart-auto-move – Mozilla Firefox false 0
Apr 22 21:01:14 debian gnome-shell[2565]: [smart-auto-move] shouldSkipWindow() christian@debian:~ false 0
sol2070 commented 2 months ago

Same for me, on Arch, Gnome 46, Wayland, AMD Radeon. I also noted a much higher CPU usage when the extension is enabled.

khimaros commented 2 months ago

acknowledged, i'm able to reproduce this with GNOME OS nightly.

i thought i noticed something but chalked it up to being in a virtual machine.

investigating now.

khimaros commented 2 months ago

okay, the issue is that when sync or save frequency < 1000, it rounds down to 0 in the call to GLib.timeout_add_seconds()

this results in syncing/saving continuously. short term fix is to bump the value to 1000 or higher. i'm working on a proper fix.

khimaros commented 2 months ago

indeed, this was caused by a rounding error in calls to GLib.timeout_add_seconds() which i've resolved by switching back to GLib.timeout_add(). breakfix release is under review by GNOME folks.

khimaros commented 2 months ago

fixed in v26 on extensions.gnome.org and https://github.com/khimaros/smart-auto-move/releases/tag/v26

sol2070 commented 2 months ago

Great, thank you!