-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Quickmark completion #189
Quickmark completion #189
Conversation
No worries - mind rebasing it though? From the top of my head:
This looks like the most performant way it can currently be done, I'd have to test and profile it to say more about why it's slow. |
This was discovered in #189.
For some reason calling sourceModel() takes quite some time, which accounts for about 1-2s of delay when showing the completion. This matters for #189 for example.
It still slows stuff down while typing, but at least it's a lot more responsive for the initial load. See #189.
It works, but: * terrible performance (5s for ~1600 marks) * split and join operations in the loop - i want direct access to name + url in the marks dict! how?
thx to the fix from The-Compiler!
Something is kaputt now.. When I scroll through the completions, the completer "recompletes" itself with one result - the highlighted quickmark. Hmm... |
Thanks, I fixed this now I hope. Is it intended that the user can complete the URLs instead of the names? I'd have expected to complete the names with |
Excellent idea. |
Also the model currently won't update when the user adds/removes quickmarks. However doing this would mean we'd have to convert the stuff in Is it okay if I do that, and then you can update your part accordingly? |
Of course. Thx! |
@@ -25,6 +25,7 @@ | |||
from qutebrowser.models import basecompletion | |||
from qutebrowser.utils import log, qtutils, objreg | |||
from qutebrowser.commands import cmdutils | |||
from qutebrowser.browser import quickmarks |
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.
You can remove this import now after 74839d7
Done now - rough guide to get it auto-updated:
Though the question is how long it takes to re-build the whole completion model... if it should take too long, a solution would be to do the changes twice in |
Dear Der-Kompilator, it's redi to mörtsch! |
super().__init__(parent) | ||
self._on_quickmarks_changed(self, match_field) | ||
|
||
def _on_quickmarks_changed(self, parent=None, match_field='url'): |
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.
Since we don't use this as a slot anymore, can you move the stuff below into __init__
directly?
gnah, I created a new branch on top of my importer commits... I guess I totally fucked it up this time.
Here is the quickmark completer. With lousy performance, any tips how to access the marks values more 'directly'? :>
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)