startup of locus is really slow since last update (about 35s)

Started by bongo, December 29, 2021, 11:26:03

0 Members and 1 Guest are viewing this topic.

bongo

a few days ago, locus map pro updated to 3.56.4
since then, when starting locus, i get a white screen with the locus symbol for about 20s, while nothing seems to happen.
after that, i get the ususal screen with the percentage counting up, which takes one more 15s.
so the total start time now increased to 35s.

before updating to 3.56.4, i didn't have this 20s period showing nothing but the locus symbol, i.e. it directly started with the page showing the percentage.

what is locus doing while letting me wait for another 20s (introduced with the last update)?
can this be avoided?

btw:
since updated to 3.56.1, i need to run locus from the external flash card (with some issues reported in another post), but waiting for the additional 20s on startup was not recognized before 3.56.4.
  •  

bongo

this morning, i updated to 3.56.5.
after this, i decided to move the locus directory to the internal flash...and i got some more info on the slow startup. so that's what i did in detail:

- with the sd card in the pc, i first moved the maps and mapsVector folder away from the locus pro private folder on the flash card.
- i put the sd card back in the phone and switched locus main folder to internal. took quite a while.
from this moment, startup of locus was much faster. the locus icon on the white screen only showed for about 2s instead of the 20s it had shown up before.

- then i put the sd card in the pc to move maps and mapsVector back to the locus private folders on the flash card. surprisingly, these two folders were still available as emtpy folders within the locus structure, while all other folders were gone. so then, they were no longer empty.

surprisingly, after putting the sd card back to the the phone, i noticed:
-  i could show a vector map, located on the flash card, although all folders in locus were still configured to internal
- (i didn't try to load a raster map from maps folder at this time)
- startup was still fast

to make configuration clean, i first reconfigured the maps folder to external private locus folder. after that, everything was fine so far.

after a restart, i also reconfigured the mapsVector folder to external. surprisingly, this took quite a while and it looked like some themes were copied (although i did not expect to have some themes internally as i had moved the whole mapsVector folder away from locus before switching main folder to internal).

anyway, this did not seem to change a lot as i was able to use vector maps already before reconfiguring to external (don't know why).
but what i see now is, that the white screen with the locus icon shows up for about 22s on startup.

or to make it short:
while i had mapsVector configured to internal (but maps were on external flash), i was able to load vector maps from the external flash and startup time was fine.
s soon as i configured mapsVector to external flash, startup got very slow again.
  •  

michaelbechtold

I have a suspicion what is going on there:
- Locus seems to look at INT + EXT SD private folders and collects maps from both (I saw that in my tests the other way round
- I suspect, you have expanded themes (xml and svgs as many single files), right?
-- if yes, then moving the mapsVector folder to EXT SD is a very bad idea, because Android sucks with those files
-- this is why Menion introduced the ZIP theme feature
- if above assumption re. theme structure holds true, then just ZIP the theme - XML and the SVG folder on the uppermost level of the ZIP (from ZIP theme Locus creates an internal copy of the theme on INT SD for speed ...)
- OR take out the EXT SD, remove the theme via PC and in Locus switch back to INT SD for mapsVector (with the SD card still out, so Locus cannot copy anything :-) Then put SD back into the device and restart Locus.
Pls. read above as devil's advocate and validate the thoughts ...
  •  

bongo

thanx for the hint!
just heard once about zip themes - but had no idea what this is for.
so i compressed all my themes located in subfolders under the _themes folder, one by one, and deleted the former subfolders containing the 39 uncompressed themes.
so now, the "white screen with locus logo" phase on startup is reduced from 20 to 12 seconds.
so it's still much slower than before the last updates, but at least better than before compressing.
thanx for your support!

btw: what kind of problem does android have with with uncompressed themes?
i just try to understand what's going wrong, as this issue might be related to the issue of the geocaching folder, which i have since 3.56.1
  •  

michaelbechtold

THIRTYNINE themes??? You beat me hands down :-)

Themes contain many (graphic) files, and the access method under Android 11 makes that slow in comparison to earlier Android versions. I am not an Android DEV, so I cannot go deeper, sorry.

BTW: as Locus makes an internal (!) uncompressed copy from the ZIP files (but I do not know WHEN that happens): is another start of Locus slow again, or better then?
  •  

bongo

yeah. they came togehter over time, as i use different types/generations of vector maps using different types of themes.
and over time, i think i lost a bit the overview. so there might be some themes i do not really need anymore.

and there is bad news about startup time:
i haven't changed anything in the mean time, but after not running locus for about 1 hour, startup again took 22s,
and after stopping it and starting for a 2nd time, it took 18s.

so no real advantage from using the zipped themes.
  •  

michaelbechtold

There is a logging function that you can activate by long press on the left hamburger menu.
Activate the logging to file (!) and all options except the GPS related one.
Menion then can see what the heck is happening ...
  •  

bongo

in the mean time, i tried your option 2 (maybe not exactly as you described):
i moved the mapsVector folder away (using the pc), switched the mapsVector folder to internal, and moved the folder back (using the pc) under the private locus structure on the external card.
now, startup takes about 12s (only tried twice).

so now, the vector maps were still available, but there were no more themes.
checking internal private structure shows that the mapsVector folder only contains an empty folder called _themes.
so now, i copied all themes to the internal mapsVector folder (unzipped version).
now, startup takes about 12-15s. so no big change from having no themes at all.

do i need to expect any issues, when having mapsVector configured to internal while having all the vector maps in the external folder?
  •  

michaelbechtold

Any download or update will go to the internal mapsVector then, but via PC you can move them to external (if LoMaps), or in case of other map sources, just download to PC and then push the new versions to the EXT SD via PC.
The start times should be checked by Menion, based on your logs.
  •  

bongo

ok, i tried to enable logging, but maybe i do someting wrong.
after enabling, i get a white window "Pref 'KEY_B_DEBUGS_LOGS_TO_FILE'", as well as a green field saying "Log to file: Disabled".
and after that, the hamburger menu still shows that logging is disabled.
  •  

bongo

Quote from: michaelbechtold on December 30, 2021, 19:03:05
Any download or update will go to the internal mapsVector then, but via PC you can move them to external (if LoMaps), or in case of other map sources, just download to PC and then push the new versions to the EXT SD via PC.
The start times should be checked by Menion, based on your logs.
ok, so no issue for me as i download the maps from the pc anyway and copy them to the sd card then.

but i think this is only valid for mapsVector, that locus reads data from internal and external location as well, while it is configured to internal? right?
so for maps and subfolders of data, only internal or external is checked and not both?
  •  

michaelbechtold

1) this error re. logging to file I know - from before Dec, 23rd. Menion improved the options for logging, but reactivated the old error that he had fix for the Dec. 23rd version .-(
2) I know this checking in both places for mapsVector. Other stuff I simply did not test.
  •  

Menion

Hi guys,
A few notes from the dev side:

- app scan all files in the mapsVector directories. It simply checks every single file, so the amount of files matters!! On the second side, the directory "_themes" is skipped!! so extracted themes in this directory should not affect startup performance.

- error you see when enabling "log to file" is because you use the public version and not the Beta version. I'll have to improve this error, anyway, for now, logging is useful only with Beta versions.

And > new Beta version just created, so please download & install it (link to download is in my signature), after the start, enable logging to the file and also INITIALIZE, INITIALIZE_MAPS and MAPS_CORE categories. Close the app by double click, wait 5+ seconds, and start it again. After it is fully started, send me a log from Locus/logs directory. Thanks!
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

john_percy

Tapatalk doesn't show signatures, so I can't easily find the link to the download.

Sent from my moto g(6) plus using Tapatalk

Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

bongo

hi menion

ok, so i think it's not because of the themes. so this matches what i've seen during the tests.

so short question about installing the beta:
- will this install side by side with the official version from google play or will it replace the official one?
- and if it replaces, how will i get back to the official version afterwards?
  so far, i only know about getting beta versions from google play (but also don't remember exactly how to do so)
  •