History view is slow to load with a large amount of records

Bug #1622969 reported by Andrew Hayzen
14
This bug affects 3 people
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.04.20160912-0ubuntu1
  Candidate: 0.23+15.04.20160912-0ubuntu1
  Version table:
 *** 0.23+15.04.20160912-0ubuntu1 0
       1003 http://ppa.launchpad.net/ci-train-ppa-service/landing-084/ubuntu/ vivid/main armhf Packages
        100 /var/lib/dpkg/status
     0.23+15.04.20160825-0ubuntu1 0
       1001 http://ppa.launchpad.net/ci-train-ppa-service/stable-phone-overlay/ubuntu/ vivid/main armhf Packages
     0.23+15.04.20150416-0ubuntu1 0
        500 http://ports.ubuntu.com/ubuntu-ports/ vivid/main armhf Packages

$ system-image-cli -i
current build number: 398
device name: mako
channel: ubuntu-touch/rc-proposed/bq-aquaris.en
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 (ahayzen)
description: updated
Olivier Tilloy (osomon)
Changed in webbrowser-app (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Florian Boucault (fboucault) wrote :
Revision history for this message
Florian Boucault (fboucault) wrote :

After profiling, delay seems to be caused by the sorting by 'lastVisit' of the HistoryDomainListModel. 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".

Changed in webbrowser-app (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Florian Boucault (fboucault)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.