openlayers / ol2

OpenLayers v2 - deprecated!
Other
1.47k stars 771 forks source link

-webkit-transform in style.mobile.css slows freehand drawing on iOS #542

Open adv-isu opened 12 years ago

adv-isu commented 12 years ago

On my iPad 2 (iOS 4.3) and "New iPad" (iOS 5.1), the CSS fix added for #511 considerably slows down freehand drawing with the DrawFeature tool. Here's a page with two links to try on an iPad:

http://adv-isu.github.com/openlayers/freehandDrawing/

Interestingly, when I tried putting two maps on the same page, one with the -webkit-transform and one without, both were laggy. So the use of -webkit-transform in one map must somehow alter the behavior of the whole page.

Re: #511, I think (but would have to confirm) that the full-screen flashing only happened for me when tile animation was turned on. So a possible alternate solution to that bug and this one would be to shut off both tile animations and the 3d transform on iOS devices. This would also fix the incredibly obscure problem reported in #514. But it would be a sad loss of those new features (both the tile fade-ins provided by tile animation and the the pan/zoom speedups provided by the 3d transform).

adv-isu commented 12 years ago

For anyone who would like to test but doesn't have an iPad, I just noticed that the slowdown is observable even in Chrome (19) on Windows. At least on my 2.99 GHz Core 2 Duo. In the first example (linked above), you'll notice that the "mouse position" point lags behind the mouse pointer as you drag onscreen; in the second example, it doesn't.

elemoine commented 12 years ago

Is freehand drawing that common? I'd rather keep tile animation (and the webkit-transform hack) by default, and mention in the release notes that this causes performance issues with freehand drawing. Opinions?

adv-isu commented 12 years ago

Yeah, I would assume most people are using OL for map display, not data capture, and most people doing data capture don't enable freehand mode. A mention in the release notes would be good. I've already got some CSS in my own app to override the defaults, so for me this problem is addressed well enough. Just thought I'd let people know it exists.