mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
mobile: remove fine-grained notification
When initializing the fulltext-cache and the dive-list, every 100 dives a notification was shown. I had a feeling that this made startup significantly slower, but that could have been purely psychological. Therefore I measured and indeed, removing the fine-grained notification, it becomes *significantly* faster. For a 3500 dives test log with mobile-on-desktop: Initialization of the fulltext: 1350 ms -> 730 ms (-46%) Initialization of the divelistmodel: 689 ms -> 113 ms (-83%) Let's remove the fine-grained notification. There *is* a visual indication of work-in-progress anyway. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9feda56006
commit
8b93d67106
2 changed files with 3 additions and 10 deletions
|
@ -148,14 +148,9 @@ void FullText::populate()
|
|||
uiNotification(QObject::tr("start processing"));
|
||||
int i;
|
||||
dive *d;
|
||||
for_each_dive(i, d) {
|
||||
// this makes sure that every once in a while we allow the
|
||||
// UI to respond to events
|
||||
if (i % 100 == 99)
|
||||
uiNotification(QObject::tr("\r%1 dives processed").arg(i + 1));
|
||||
for_each_dive(i, d)
|
||||
registerDive(d);
|
||||
}
|
||||
uiNotification(QObject::tr("\r%1 dives processed").arg(dive_table.nr));
|
||||
uiNotification(QObject::tr("%1 dives processed").arg(dive_table.nr));
|
||||
}
|
||||
|
||||
void FullText::registerDive(struct dive *d)
|
||||
|
|
|
@ -725,8 +725,6 @@ void DiveTripModelTree::populate()
|
|||
uiNotification(QObject::tr("populate data model"));
|
||||
uiNotification(QObject::tr("start processing"));
|
||||
for (int i = 0; i < dive_table.nr; ++i) {
|
||||
if (i % 100 == 99)
|
||||
uiNotification(QObject::tr("\r%1 dives processed").arg(i + 1));
|
||||
dive *d = get_dive(i);
|
||||
update_cylinder_related_info(d);
|
||||
if (d->hidden_by_filter)
|
||||
|
@ -754,7 +752,7 @@ void DiveTripModelTree::populate()
|
|||
|
||||
// Remember the index of the current dive
|
||||
oldCurrent = current_dive;
|
||||
uiNotification(QObject::tr("\r%1 dives processed").arg(dive_table.nr));
|
||||
uiNotification(QObject::tr("%1 dives processed").arg(dive_table.nr));
|
||||
}
|
||||
|
||||
int DiveTripModelTree::rowCount(const QModelIndex &parent) const
|
||||
|
|
Loading…
Reference in a new issue