-
Notifications
You must be signed in to change notification settings - Fork 305
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
Perfomance: allow to set the onUpdateUI timeout using a hidden pref (… #2589
base: master
Are you sure you want to change the base?
Conversation
…onUpdateUI_timeout); fixed Komodo#2470 Signed-off-by: Defman21 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would invoke getLong across xpcom every time updateUI is called, which is bad for performance. If we are to make a pref for this the pref needs to be stored (cached) and updated as needed (via pref observers).
I'll look into that. |
Signed-off-by: Defman21 <[email protected]>
Now |
Signed-off-by: Defman21 <[email protected]>
Signed-off-by: Defman21 <[email protected]>
I'll do a fixup/rebase once you'll review my changes :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only creating the observer and not removing it. Which could lead to lingering observers and a minor memory leak. But seeing this I'm kind of second guessing whether to use an observer at all. I don't like the idea of having an observer for each buffer, but there is no better solution that I can see.
Given that this is a hidden pref I think we should just remove the observer part altogether. If someone wants to change this pref they'll have to restart Komodo or reopen their buffers. This pref will never be exposed in the UI.
I agree. |
Signed-off-by: Defman21 <[email protected]>
…e view.prefs instead of require Signed-off-by: Defman21 <[email protected]>
…onUpdateUI_timeout); fixed #2470
Signed-off-by: Defman21 [email protected]