{"action":"created","issue":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/547","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/547/comments","events_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/547/events","html_url":"https://github.com/The-Compiler/qutebrowser/pull/547","id":60740602,"number":547,"title":"History completion","user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/component:%20ui","name":"component: ui","color":"5319e7"},{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-03-11T22:26:44Z","updated_at":"2015-03-16T15:03:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/pulls/547","html_url":"https://github.com/The-Compiler/qutebrowser/pull/547","diff_url":"https://github.com/The-Compiler/qutebrowser/pull/547.diff","patch_url":"https://github.com/The-Compiler/qutebrowser/pull/547.patch"},"body":"This is the continuation of #531 - related issue: #32.\r\n\r\n/cc @toofar @fosskers\r\n\r\n## Open issues\r\n\r\n- [ ] Sometimes the history completion doesn't update anymore when visiting new pages.\r\n    * One possible issue: When the completion is limited to the 1000 newest items, `self._history.historyContains(entry.url_string)` will still be True even if the entry is in the full history, but not actually in the completion.\r\n- [x] Slicing of the last N URLs doesn't seem to work properly\r\n    * I don't have `http://heise.de/` in my history completion even though it's on line 15085 of 15320 in my history file.\r\n- [x] Currently there are duplicated entries if something is in `WebHistory._old_urls` and in `WebHistory._new_history`. I'm not sure what's the best way to fix that though.\r\n- [x] `RuntimeError` because category `QStandardItem` got deleted in `history_changed`.\r\n    * [details](https://github.com/The-Compiler/qutebrowser/pull/531#issuecomment-78352762)\r\n    * Reproducable on @toofar's `histcomplete` branch when (after applying a [small fix for the segfault](http://paste.the-compiler.org/view/560fe104)) opening/closing a second window, and then opening a new URL.\r\n    * Maybe the `lambda` connected to `WebHistory.item_added` doesn't get disconnected properly when the window was closed and the completion model was destroyed? I don't really get why, but it's not reproducible anymore with the new code not using a `lambda`.\r\n- [x] segfault when using `:open -w`\r\n    * This only seems to occur in 834832e3ba73bb81a8783491b862711bf2e5eb83 from #531 by @toofar, but is gone in 0b975db4ddc7185f054fef6adf6e6406800e49e8 with my changes.\r\n    * [C++ stacktrace](http://paste.the-compiler.org/view/e41aa3e3)\r\n    * [python report](http://paste.the-compiler.org/view/085ca9c4)\r\n- [x] A new `Completer` object is created for each `CompletionView` currently, and thus for every `MainWindow`. This means opening a new window takes more time (~1s on my machine) and RAM.\r\n    * I think every view still needs its own `Completer`, but the model should be global instead.\r\n    * See the [profile output](http://qutebrowser.org/tmp/history_profile.png) for running `:repeat 20 open -w` and `:quit`.\r\n- [x] Performance still isn't that good for some users, we probably should limit the amount of old history we load, with a config option.\r\n\r\n## Other things and nice-to-have\r\n- [x] Should there be duplicates for URLs with different [fragments](https://en.wikipedia.org/wiki/Fragment_identifier)? Maybe the fragment should always be stripped when adding the URL to the history? Especially for javascript-URLs with a `#` and empty fragment...\r\n    * We shouldn't strip fragments, as they are used for single-page webpages to save state.\r\n- [x] The third column can have a date in a human-readable format, ideally configurable with a new config option `completion -> timestamp-format` or so.\r\n- [x] *\"which usually the last ones accessed\"* in `qutebrowser/browser/history.py` is confusing\r\n"},"comment":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/comments/81720703","html_url":"https://github.com/The-Compiler/qutebrowser/pull/547#issuecomment-81720703","issue_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/547","id":81720703,"user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T15:03:38Z","updated_at":"2015-03-16T15:03:38Z","body":"@flvi0 I opened #557 for that.\r\n@fosskers: Using `- [ ] foo` - see [Writing on GitHub - Task lists](https://help.github.com/articles/writing-on-github/#task-lists)"}}