LapTimer v23 backup and session grouping issue

News and updates from the author // Read only
Post Reply
ereynold60
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 87
Joined: Fri Mar 13, 2015 9:31 pm

LapTimer v23 backup and session grouping issue

Post by ereynold60 »

Harry - I have experienced 2 issues with v23 and v23.0.1

1. Since v23 the Database/Backup function does not complete on Android. Previous would complete and leave a "Laptimer-All-yyyymmdd.hptrlz file in root directory.

2. The May-30 update (still v23.0.01) on Android now has a significant display issue in Lap List. Going from LAP to SESSION view was near instantaneous. Today's update now requires 30-45 seconds to produce a SESSION display of laps. I also noticed the initial display of Lap List "flashes" ever since v23, whereas v22 never did that. Not a big deal, but looks strange.
User avatar
Harry
Site Admin
Site Admin
Posts: 10516
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: LapTimer v23 announcement (iOS and Android)

Post by Harry »

Hello,

Thanks for the feedback.

1. I cannot reproduce this item, I tested it both using Mail and Share (and selected Dropbox). This is probably some issue with your database or permissions. For the later, please make sure you grant all permissions requested by LapTimer. Check in Settings app ‣ Apps ‣ LapTimer ‣ Permissions. To fix database problems, select LapTimer ‣ Administration ‣ Databases ‣ Check Data.

2. Well possible in case you have a *very* long list of laps / big database. I have changed the session detection for 23.0.1 - which involves data checks on fix instead if lap level. I check for an Android installation with 400 laps / 220000 fixes and an old Nexus 6, and switching is done in approximately 2 seconds. On the iPhoneXs it is switching instantly. Can you give me your numbers (top of Lap List) and which hardware you are using.

- Harry
Image Image Image Image
User avatar
Harry
Site Admin
Site Admin
Posts: 10516
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: LapTimer v23 backup and session grouping issue

Post by Harry »

[Splited this topic from the original announcement post]

Beware, this is IT stuff! ;)

I profiled session grouping for my sample database. Results for the pure data retrieval / processing part are as follows:

iPhone XS Max (single core Geekbench: 4789): 0.8s
Nexus 6 (single core Geekbench: 1600): 7.8s

For both platforms, the time is less than the half for the second switch - which is a result from database caching.

What does this mean?

Firstly, these numbers need to be normalized because the XS Max is probably the fastest smartphone in the market while the Nexus is dated. Using the Geekbench score to normalize the Android result, we get 2.6s instead of 7.8s. As not only processing power is relevant, but IO has a massive impact due to database access, this is a rough extrapolation only.

The named processing part uses the precisely same code compiled for iOS and Android. It is in the C++ core running natively on both platforms. As Geekbench focusses on processing and not IO, I assume the Android IO is less efficient - at least for the two sample devices used.

As written before, it looks like the time required for session grouping is not growing linear with database size, but worse. So even when adding processing power, big databases will lead to lags like that you have seen.

The root cause for the slower performance compared to v22/23 is the changed approach to identify sessions. The new approach (v23.0.1) is far more reliable than the former approach, but slower because it needs to do an in depth analysis.

Like always in computer science, this can be solved by pre-calculating session structures bringing this operation to nearly zero seconds. The downside will be that pre-calculations need to be handled throughout the code, adding complexity and load in other areas.

I have done some optimizations for v23.0.2 which will bring down calculation times by roughly 40%. For very large databases, the lag will be visible nevertheless. So in addition, I will add one of the well known progress screens when performing this operation on Android with database sizes with more then 100000 positions recorded. This will give the user a visual feedback something is going on the app is not frozen.

- Harry
Image Image Image Image
ereynold60
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 87
Joined: Fri Mar 13, 2015 9:31 pm

Re: LapTimer v23 backup and session grouping issue

Post by ereynold60 »

ereynold60 wrote: Fri May 31, 2019 9:12 pm I have a large database... 876 laps and 1313203 fixes. Phone is a LG G6 about 1 year old.

I have no issue using the "Track Day" and "Year" views in Lap List, but Session view takes 20 seconds (I timed it). Still it is fairly annoying.

Thanks.
Harry - I understand the "new method" for reliably grouping sessions, but the delay makes the "Session View" nearly unusable. Also, there is the same delay when I select a single lap in Session View, and then return back to Session View. In my case, it takes 20 seconds to produce the Session View, and also 20 seconds when return back to Session View after reviewing individual laps in the session.

Is it possible to move the code for "grouping sessions" into the Check Data routine, instead of running it every time Session View is selected. I've never had a problem with sessions grouped by time, in the past. Or can you add an "Expert Setting" to turn on/off the Session Grouping logic?

Thanks!
ereynold60
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 87
Joined: Fri Mar 13, 2015 9:31 pm

Re: LapTimer v23 backup and session grouping issue

Post by ereynold60 »

ereynold60 wrote: Mon Jun 03, 2019 5:00 pm Is it possible to move the code for "grouping sessions" into the Check Data routine, instead of running it every time Session View is selected. I've never had a problem with sessions grouped by time, in the past. Or can you add an "Expert Setting" to turn on/off the Session Grouping logic?
Harry - Even with v23.0.2, Session view is still taking 20 seconds, but there is the 'hourglass' notification. And, as previously stated, when I return to Session view after reviewing a single lap, it again takes 20 seconds to get back into Session view.

I would ask that you review my recommendation above.

I'm sorry, but Session View is now unusable. I will just use TrackDay view, which groups laps into sessions in about 1 second, using whatever prior logic existed.
Post Reply