zoom in/out - ProcessLoadTask

Aug 18, 2010 at 1:33 PM

hi Radioman,

I've done some url request sniffing, found out that if you zoom in/out only one ProcessLoadTask routine is working at a time.

If you zoom in/out by two or more levels only the number of levels zoomed, ProcessLoadTasks are working.

If you pan the map around it fires more ProcessLoadTasks.

I've used the latest hot build (windows forms), Fiddler for URL sniffing, WinXP, VisualStudio 2008

Best regards

Aug 18, 2010 at 1:38 PM

the easiest way to replicate if using the MapBendersWMS MapType as it is not cached.

Aug 18, 2010 at 2:02 PM
Edited Aug 18, 2010 at 2:03 PM

if time between requests is long enough, the same thread does the job, but if first thread is already doing something then that task takes second thread and so on..., there is no differences between zooming/panning

p.s. every MapType is cached, unless you set mode to ServerOnly

Aug 18, 2010 at 3:38 PM

Even when the cache is used it is the same, but for demonstration purposes I clear it before, just to show the problem. And set the map to MapBendersWMS because it's the slowest.

Please do the folowing:
1. delete the cache file
2. open your demo application
3. select MapBendersWMS MapType
4. wait until the map is completly loaded
5. zoom in and time the loading (for me 22seconds)
6. another zoom, but after zoom just move the map a little to the left and to the right (for me 6seconds)

Repeat the steps but switch step 5 and 6 ... I get 6seconds (with zoom+move) and 16seconds (just zoom)

please report what are your times ?

Or just use Fiddler (or any other url sniffer) and you are going to see what I'm talking about.

Best regards

 

 

Aug 19, 2010 at 5:53 AM

debug output shows few threads working, where is the problem?

Aug 19, 2010 at 7:31 AM

Debug output shows a few working but only one at a time.

Did you time the load times ?

did you try to use URL sniffer ?

you can even see the problem in your demo app where I added the indicator of working load processes at http://www.cvs.si/gmapdemo.zip

Best regards

Aug 19, 2010 at 7:40 AM

well your demo works slow ;}

Aug 19, 2010 at 9:59 AM

did you see the processes working ???

1. if you just zoom in/out

2. you move the map to the place where it has to load it ???


No more problem, I found a workaround/fix.

Thank anyway

Aug 19, 2010 at 10:51 AM

what do you mean you found workaround? Can you explain more, maybe in some configurations there are issues ;/

Aug 20, 2010 at 5:32 AM

Hi radioman,

If you don't see the problem, there is no problem.

It works for you when people need help, ...

Best regards,

KrNeki99

Aug 20, 2010 at 5:38 AM

;/

Aug 20, 2010 at 12:31 PM

Please share you workaround krneki99. Sounds like something I've been struggling with for month on my mobile....

Aug 20, 2010 at 12:52 PM

Hi sthex,

Inside ProcessLoadTask void (GMap.NET.Internals.core.cs)

after "last = tileLoadQueue.Count == 0;" line

add this two lines (this insures if more loading is to be done, that all threads are triggered)

if (!last)

waitForTileLoad.Set();

 

please report if this works for you on mobile ;)

Aug 20, 2010 at 12:57 PM

but it's already in 1091 line, last loader makes additional trigger

Aug 20, 2010 at 1:15 PM

It's not worth answering, but anyway...

your line 1091 only triggers one thread at at time.

You have 5 threads fetching data.

Until you call waitForTileLoad.Set(); multiple times, only one is working, other is waiting on the start of while loop for ".Set"

I know one call to ".Set" should trigger all the while loops, but for some reason it doesn't.

So my soultion as soon as Thread gets what tile it need to load and more are inside a queue. It triggers the next one.

(before loading data)

I posted what fixed my problem if you/others whats to use it ok, otherwise ok also ;)

Best regards

Aug 20, 2010 at 1:35 PM

g, thats really a bug ;/ i'll need to fix it

Aug 20, 2010 at 6:48 PM

krneki99 thank you very much, I had the same issue

Aug 31, 2010 at 7:48 PM

Hi radioman,

tried your version of the fix...

... I would try to change it because my "workaround" works twice as fast.

Usual load from cache only: yours=350-450ms, mine=150-250ms (on mine machine)

Best regards,

Blaz