-
Notifications
You must be signed in to change notification settings - Fork 577
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
save_tabs function is way too aggressive #1633
Comments
We use save_tabs_when_changed decorator to save the tabs. Currently, it puts on Do you have any idea for another way to save the tabs not that aggressively? By timer for example? |
I'm not sure if a timer is a good idea, but to reduce the load it would make sense to move the decorator to update_window_title Then on_terminal_title_changed() would need to save the current title, and only call update_window_title() if there is a change. But it's a real question if the window title really needs to be saved in the restore log. |
This feature also tends to slow down over time the amount of time it takes for guake to appear when using the keybind. I disabled the saving of tabs and guake went right back to being snappy and responsive. |
@isrrapy What is "time it takes for guake to appear", do you mean toggling guake will slow down when enabling this feature? |
Yes @mlouielu. I noticed added lag for toggle-showing guake in heavy-disk-load situations (like, when compiling a big-ish project). |
Necromancing an old issue since it's still pretty bad.
The reason for 2 and the second save in 3. is that the "label" is saved for every tab, .
I think that there is no reason to save the "label" unless when *) This will miss changes to the "directory" entry, but if guake would just watch for directory changes instead of title changes this would result in fewer saves. |
This should fix #1633. This commit remove `@save_tabs_when_changed` on `on_terminal_title_changed`, and put the terminal directory into ther instance. This is because `vte:current-directory-uri-changed` is not worked, and `current-directory-uri` always return `None`. When `on_terminal_title_changed` called, it will check if the directory changed for this terminal, if so, then save the tabs by the setting.
See PR #1786, should fix this issue. But please help to test if it raise other issue. Not sure why Vte.Terminal.get_current_directory_uri() always return |
This 👆 |
This is fixed in #1786, On the other hand, custom label will save the tabs when |
That was not what I meant. |
This should fix #1633. This commit remove `@save_tabs_when_changed` on `on_terminal_title_changed`, and put the terminal directory into ther instance. This is because `vte:current-directory-uri-changed` is not worked, and `current-directory-uri` always return `None`. When `on_terminal_title_changed` called, it will check if the directory changed for this terminal, if so, then save the tabs by the setting.
On current master (), the save_tabs function is being called way too much.
When PS1 is set to update the title, save_tabs is called every time Enter is pressed in guake.
To reproduce:
Add this to .bashrc, or just run this snippet in a guake shell.
Press enter in guake terminal for about a second:
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561134
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
mom, I've been called: on_terminal_title_changed <function Guake.on_terminal_title_changed at 0x7fd9a0196ea0> at 1566561135
Guake tabs saved to /home/user/.config/guake/session.json
The text was updated successfully, but these errors were encountered: