Re: [ol3-dev] Mobile performance

2016-10-14 Thread OL3 Dev on behalf of Julien-Samuel Lacroix
Thanks both of you for the advices. This indeed speed up the map a lot. 
This doesn't solve all issues since now the resolution is bad, but may 
help to get an idea for a fix. I'll let you know if I find any 
performance improvements.


Julien

On 2016-10-13 03:13 AM, Viglino Jean-Marc via OL3 Dev wrote:

Hello,

You can use the hidpi option to turn off WMS request based on
pixelRatio. The result is mainly visible on texts.
See http://jsfiddle.net/Viglino/Lpbnw14z/

Also pay attention to the fact the canvas map already gets into account
the pixelRatio, ie. a 100x100 px map  will result in a 200x200px canvas
on mobile (with pixelRatio of 2).
In your fiddle, your map canvas has a 950x1400 px canvas on a laptop,
but 1900x2800 px on a mobile: 4 times more area and 4 time longer to draw...

@+

--
You received this message because you are subscribed to the Google
Groups "OL3 Dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ol3-dev+unsubscr...@googlegroups.com
.
To post to this group, send email to ol3-dev@googlegroups.com
.
Visit this group at https://groups.google.com/group/ol3-dev.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ol3-dev/5665537f-984c-486c-bae9-312fa61c01e2%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.


--
Julien-Samuel Lacroix
T: +1 418-696-5056 #202
Mapgears
http://www.mapgears.com/

--
You received this message because you are subscribed to the Google Groups "OL3 
Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ol3-dev+unsubscr...@googlegroups.com.
To post to this group, send email to ol3-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/ol3-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ol3-dev/3ea0e9df-2113-e08b-0baa-87125216ac19%40mapgears.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ol3-dev] Mobile performance

2016-10-13 Thread Viglino Jean-Marc via OL3 Dev
Hello,

You can use the hidpi option to turn off WMS request based on pixelRatio. 
The result is mainly visible on texts.
See http://jsfiddle.net/Viglino/Lpbnw14z/

Also pay attention to the fact the canvas map already gets into account the 
pixelRatio, ie. a 100x100 px map  will result in a 200x200px canvas on 
mobile (with pixelRatio of 2).
In your fiddle, your map canvas has a 950x1400 px canvas on a laptop, but 
1900x2800 px on a mobile: 4 times more area and 4 time longer to draw...

@+

-- 
You received this message because you are subscribed to the Google Groups "OL3 
Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ol3-dev+unsubscr...@googlegroups.com.
To post to this group, send email to ol3-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/ol3-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ol3-dev/5665537f-984c-486c-bae9-312fa61c01e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ol3-dev] Mobile performance

2016-10-11 Thread OL3 Dev on behalf of Andreas Hocevar
This is because of the higher device pixel ratio of your mobile
device. The higher the device pixel ratio, the bigger the requested
WMS images, the more pixels to compose. If the device has a device
pixel ratio of 2, the requested images will have 4 times the number of
pixels, and composing them will also take 4 times as long. For 3
layers, this means 12 times the composition time compared to a device
with a pixel ratio of 1.

My advice: remove the `serverType` configuration option from your WMS
layers, which will make OpenLayers request tiles from the WMS with a
pixel ratio of 1.

Andreas.

On Tue, Oct 11, 2016 at 8:13 PM, OL3 Dev on behalf of Julien-Samuel
Lacroix  wrote:
> Hi,
>
> I have a really simple OL3 map, an OSM basemap with 3 WMS layers, based on
> the WMS Tiled example page. Everything works fine in a browser, but when I
> try this page on my mobile phone or on a tablet, the performance drops
> drastically.
>
> The animation of a simple pan is slow and seems irresponsive. I ran the
> Chrome Timeline tool on it and all the time seems to be spent in drawImage.
>
> drawImage
> On a mobile (Nexus 6P) : 1288 ms (88% of the total time)
> On a laptop: 5.6 ms (3% of the total time)
>
> Test application:
> http://jsfiddle.net/r186zucL/
>
> Do anyone as an idea of why we would see such a big difference in the
> performance of the canvas renderer on mobile?
>
> Note that using only one layer at a time (instead of 4) makes everything
> work alright. Also, when I test, I make sure to not pan to request new
> tiles, so network should not be the issue.
>
> Best regards,
> Julien
>
> --
> Julien-Samuel Lacroix
> T: +1 418-696-5056 #202
> Mapgears
> http://www.mapgears.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "OL3 Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ol3-dev+unsubscr...@googlegroups.com.
> To post to this group, send email to ol3-dev@googlegroups.com.
> Visit this group at https://groups.google.com/group/ol3-dev.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ol3-dev/e013c3e6-eb75-390b-9be8-d65f7c737ff5%40mapgears.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Andreas Hocevar
Geospatial Solutions Engineer | Boundless
ahoce...@boundlessgeo.com
@boundlessgeo

-- 
You received this message because you are subscribed to the Google Groups "OL3 
Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ol3-dev+unsubscr...@googlegroups.com.
To post to this group, send email to ol3-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/ol3-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ol3-dev/CAOiJ94gK3q-1UuTZ3OR8CPhPyOnkU5hqMghJWYi0%2B_NVdG9Omw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.