-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: My Places > Tracks screen again very slow to open (20 sec) #20844
Comments
Yes, when reading gpx files, the shared library is currently used. But recently there were changes to speed up reading the file list using platform method - 41f30f1 Did you try latest nightly version of OsmAnd? |
Hm. Does not happen here running the ~4.9.0#3190 (1350 tracks in 75 folders, takes about 2-3sec), but all track folders are switched back to "last edited" again... |
There was also fix of bug which cause mess with folders in DB - 18e91d1 |
@sonora I see. Can you may be send logs similar to those from first message, but from master branch 2024-09-07? |
Sure, @alex-osm !
|
I believe the problem are the countless I/O operations going on. We should probably cache the file tree, along these lines:
|
NativeFile was introduced to eliminate slow kotlin calls when calling expensive methods like listFiles(). In other words, it shouldn't be a problem and should work as fast as before. |
Yes, I have to admit I am still not sure which change exactly caused the current regressiion. I think this 1410005 was a big performance gain last time I had looked into this. Essentially this had eliminated the expensive single |
Amazing, good work! I experience ~1 sec loading time, best ever since we left the foldout setup of the tracks screen behind many months ago! What does not yet work is entering the 'Visible on map' screen, both via the MyPlaces>Tracks screen and via Configure map. The screen is empty and non-functional. PS: Log confirms the speedup: 615 ms. But it also contains GPXUtilities read errors for a number of tracks, see here. These were often user tracks I had imported to debug some of our user issues. But objectively they seem ok, and can be displayed ok.
|
Great news! There was side effect about broken screens. Fixed. About read errors - could you may be attach the file to reproduce the error? |
Perfect! Works flawless now, from what I see! I have checked the handful of my ~3500 tracks which cause an 'Error reading GPX' logcat entry (the track referenced in my log snippet above was a test-edited version of the user-provided one in #19995), and find they indeed have small issues. Like a missing And I guess my PR #20845 has become obsolete, or is there any value still? (It would now need conflict resolving.) |
PS: I just notice tbe following glitch still: Sometimes when first opening the MyPlaces tracks screen, or on rare occasions also upon a pull-down refresh there, the bottom stats seem incomplete, they show only 90% or so of all tracks. As if there are occasions where a final screen refresh is missing in the end to update the screen with the completed stats? Repeated tries seem to always produce the complete stats then. |
Fantastic! I find no flaw so far! |
Again, the time it takes to open the "My Places > Tracks screen" on my setup (~3000 Tracks in 70 folders) has increased to ~20 sec of watching the spinner. And also similarly long every time I enter the "Visible Tracks" screen. See log here: logcat.log.txt.
On previous occasions, this had been due to excessive individual File I/O, sometimes in obsolete operations (like here 24ff4cb) or sometimes in repetitive loops not bundling things as a stream. I had fixed on some occasions which had brought the opening time for the dialog down to about 3 sec. Now it's back to 20 sec.
Needs investigating. Perhaps a result of porting some code to a shared library?
The text was updated successfully, but these errors were encountered: