-
Notifications
You must be signed in to change notification settings - Fork 799
General optimizations #8351
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
General optimizations #8351
Conversation
e1de606 to
04508cf
Compare
|
Just for reference, this was closed after discussions on Slack. I did not intend for this to be closed. There were two problems I pointed out:
Since uiGroup is now entering In addition, this has led me to think allocating in JS with GenericContainer is not the bottleneck, especially if what it's doing is less resource intensive than Clutter's base allocation vfunc.
|
611e20b to
72d0a48
Compare
i think the desklet one definitely wastes resources if you're not using desklets. i'd like to keep that one in if possible. |
this timeout calls hasMouseWindow() twice per second, and it was always running even if there are no enabled desklets.
This avoids adding the zoom actors and connecting to xfixes cursor changed signal until we're actually called for the first time.
We already do this on every window restack, and that's guaranteed to catch them all, so we should just store it there and avoid also calculating it inside _updateRegions.
we already connect in layout.js, so might as well just use that one to sync the pointer.
If we don't actually have any notification sources we can exit early and avoid doing anything here.
72d0a48 to
90a1c93
Compare
|
* deskletManager: only enable mouse tracking when there are desklets this timeout calls hasMouseWindow() twice per second, and it was always running even if there are no enabled desklets. * magnifier: delay full initialization until magnifier is used This avoids adding the zoom actors and connecting to xfixes cursor changed signal until we're actually called for the first time. * layout.js: only search for popup windows once We already do this on every window restack, and that's guaranteed to catch them all, so we should just store it there and avoid also calculating it inside _updateRegions. * main/layout: only use one stage::restacked signal connection we already connect in layout.js, so might as well just use that one to sync the pointer. * notificationDaemon: notification autoclear optimization If we don't actually have any notification sources we can exit early and avoid doing anything here.
Simple profiling with the GJS/CJS profiler revealed:
-magnifier cursor update
-desklet mouse tracker
uiGroup is always allocating, and the allocate does nothing beyond default