History view is slow to load with a large amount of records
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
webbrowser-app (Ubuntu) |
In Progress
|
High
|
Florian Boucault |
Bug Description
What happened:
The history view takes many seconds (between 8-9 seconds on mako) to load when it has a large number of records (I currently have 4640 records).
What I expected to happen:
For the view to load in a reasonable amount of time, by either only showing recent entries or trimming the db. Other browsers only show the history for today/yesterday in the initial view and then have buttons to show older history.
Note: that when testing multiple windows, if one window is looking at the history view and the other navigates to page it blocks the UI for a few seconds as the history view is being updated.
$ apt-cache policy webbrowser-app
webbrowser-app:
Installed: 0.23+15.
Candidate: 0.23+15.
Version table:
*** 0.23+15.
1003 http://
100 /var/lib/
0.
1001 http://
0.
500 http://
$ system-image-cli -i
current build number: 398
device name: mako
channel: ubuntu-
last update: 2016-09-12 15:18:40
version version: 398
version ubuntu: 20160910
version device: 20160401.1
version custom: 20160904-9-vivid
Related branches
- Andrew Hayzen (community): Approve
-
Diff: 165 lines (+38/-16)4 files modifiedsrc/app/webbrowser/HistoryView.qml (+2/-6)
src/app/webbrowser/history-domainlist-model.cpp (+27/-4)
src/app/webbrowser/history-domainlist-model.h (+3/-0)
tests/unittests/history-domainlist-model/tst_HistoryDomainListModelTests.cpp (+6/-6)
description: | updated |
Changed in webbrowser-app (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
After profiling, delay seems to be caused by the sorting by 'lastVisit' of the HistoryDomainLi stModel. It should be possible to remove it by either sorting when items are inserted in that model or just by leveraging the fact that HistoryModel loads history entries from the SQLite database with "ORDER BY lastVisit DESC".