Sluggish scrolling when RMAP is outside visible area

Started by joeloc, December 23, 2011, 09:54:09

0 Members and 2 Guests are viewing this topic.

joeloc

I noticed something strange with a huge RMAP (1.8GB) of the alps that I just created. When the map is on screen (even just partly), everything scrolls nice and smooth. However, when I scroll completely outside the maps area (so that the screen is all white), Locus becomes slow and unresponsive.

It seems as if Locus takes a break every second and does some really complex calculations. Everything (scrolling etc) stops for about 0.2s and then continues normally. This effect seems to increase with the size of the RMAP.

The problem only appears when the RMAP is completely off screen. When at least a few pixels are visible, Locus behaves normally and is very fast and responsive.

Maybe you iterate through all the tiles too much when everything is offscreen?
  •  

joeloc

Speaking about huge maps: I am just trying a 3GB RMAP file again. Locus doesnt even show it in the map manager. I tried to query "adb logcat | grep locus" for some information, but it only contains rubbish as far as i can see :-). Could you maybe make it a bit more verbose with useful debug information? I'd like to know why certain RMAP files are refused.

Maybe it would be better to not ever deny a map file, even if it's broken/mangled/wrong projection or has other errors. They should still show up in map manager. When the user selects it, you can write a specific error text into the rendered tiles, eg "projection xyz not supported" or "file read error at position 4123412421". Then people know what's going on immediately.
  •  

Menion

3GB file? I'm worried that android is not even able to read such huge files ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

joeloc

probably not, but i just wanted to find out more. it's on fat32 microsd. movies up to 4GB apparently work with certain video players.
  •  

Menion

may you please send me calibration file of this map? I'll check it at least thanks to this file ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

joeloc

CompeGPS MAP File
<Header>
Version=2
VerCompeGPS=6.72
Projection=3,Transversal Mercator, 9, 0, 0, 500000,1
Coordinates=1
Datum=WGS 84
</Header>
<Map>
Bitmap=KMP-Alpen-DE-AUT-CH-IT-SLO.rmap
BitsPerPixel=0
BitmapWidth=141049
BitmapHeight=55905
</Map>
<Calibration>
P1= 0, 0,, 5.87168899997482, 47.8668659999137
P2= 70524.5, 0,, 10.5878400006239, 47.8985209060187
P3= 141049, 0,, 15.2873839956531, 47.7369799944763
P4= 0, 27952.5,, 5.94481549987443, 46.6110613118524
P5= 70524.5, 27952.5,, 10.5506702027813, 46.6413627298758
P6= 141049, 27952.5,, 15.1412682455545, 46.4867141048772
P7= 0, 55905,, 6.01320499997158, 45.3548969999388
P8= 70524.5, 55905,, 10.5159115985245, 45.3839056874145
P9= 141049, 55905,, 15.0045629983003, 45.2358419960646
</Calibration>
  •  

Menion

hmm basic UTM, all seems to be valid ... so I can create for you some testing version with debug info or you can send me some (or this) map that do not work if this is possible for you ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

joeloc

uploading 3GB is beyond my capabilities :-( and smaller maps work nicely.

maybe some fseek() or whatever this is called in java beyond the 2GB boundary fails. you have to read data from the end i guess? a bit more debug whenever rmaps fail might be helpful.

it might even be helpful in general as an error message for the normal (nondebug) user.
  •  

Menion

no problem, you're watching this thread so I'll create any debug version and post it here ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

joeloc

no change with 1.15.4.3 (ie locus still freezes for a split second when rmaps are completely off screen and i try to scroll).
also no change for the 3gb map.
  •  

Menion

joe, this version viewtopic.php?f=25&t=1404&p=8854#p8854 have enabled logging, so please do:

1. install locus
2. run CatLog and start RECording from menu
3. start locus, after full start, go to settings > misc and clear cache
4. exit, wait cca 10 sec and start locus again
5. after initializing dialog, wait for a while and then exit and also end recording

then this log, may contain all main work with RMAP maps, so there will be at least some more info where to start search for any issues
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

joeloc

I cant really debug nicely on the road. Catlog is some adb tool? No luck then :)

Doesnt it scroll slowly for you too when the map is completely off screen? It seems to me that locus does some onscreen offscreen check every second then and this check takes a long time. Maybe it iterates through all rmap tiles? Just guessing...
  •  

Menion

don't hurry, enjoy vacation or trip ;)

CatLog is nice application on market (for free)

and for me, all works fine. Yes Locus check new maps if you're out of screen, but checks only some cached configurations so this is really fast (only few milisecs). If you have in maps directory and map that do not work, try to put it temporary to another place (that locus do not search), may this may help you in the wild ;)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

jusc

I have the same problem with a smaller map. (viewtopic.php?f=10&t=1553)
The file is only 43MB

CompeGPS MAP File
<Header>
Version=2
VerCompeGPS=6.72
Projection=3,Transversal Mercator, 9, 0, 0, 3500000, 1
Coordinates=1
Datum=WGS 84
</Header>
<Map>
Bitmap=Bayern_TK50.rmap
BitsPerPixel=8
BitmapWidth=14400
BitmapHeight=15080
</Map>
<Calibration>
P1= 0, 0,, 19.9093416081958, 50.0837247796904
P2= 7200, 0,, 22.3614308885238, 49.8232381960937
P3= 14400, 0,, 24.7746372461179, 49.5128601842123
P4= 0, 7540,, 19.5442138505143, 48.4184381662295
P5= 7200, 7540,, 21.9194094699799, 48.1726556309224
P6= 14400, 7540,, 24.2599602821993, 47.8796101038621
P7= 0, 15080,, 19.2109196005431, 46.7507794192656
P8= 7200, 15080,, 21.5154732631395, 46.5188026060608
P9= 14400, 15080,, 23.7890112664128, 46.2420604524994
</Calibration>
Regards J.
  •  

jusc

btw. IĀ“cant test it in the moment, but have I to put the *.imp file in the map directory of Locus too?
Regards J.
  •