From 8b93d67106acaa4f146ee683b837d0b0cf4e31b6 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 13 Apr 2020 10:42:42 +0200 Subject: 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 --- core/fulltext.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'core') diff --git a/core/fulltext.cpp b/core/fulltext.cpp index 56b7b2dcc..8bd41e7ff 100644 --- a/core/fulltext.cpp +++ b/core/fulltext.cpp @@ -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) -- cgit v1.2.3-70-g09d2