question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chromium 77 changes to getCanvasData breaks selection performance.

See original GitHub issue

Describe the bug Chromium changes to getCanvasData (which drives forEachFeatureAtPixel) has reduced performance of OpenLayers selection by 50-100x

To Reproduce Steps to reproduce the behavior:

  1. Open Chrome 77
  2. Play with the Select Features example and monitor performance (https://openlayers.org/en/latest/examples/select-features.html)

Expected behavior 50-100x faster performance in my experience. My personal app now takes 800ms to select a feature.

Discussion https://bugs.chromium.org/p/chromium/issues/detail?id=1001845

It looks like the Chromium team might try to mitigate this, but they have also indicated it was known and intentional. It’s possible we need to re-work how OpenLayers does selection. Is there a way to limit how many calls to getCanvasData it has to make? I see it making dozens for a single selection. I imagine this is related to testing against many candidate features in the r-tree?

Workarounds You can disable 2D Canvas Acceleration in Chrome via chrome://flags

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ablakeycommented, Sep 27, 2019

Looks like they’re pretty committed to fixing this and next release sounds probable: https://bugs.chromium.org/p/chromium/issues/detail?id=1001845#c14

1reaction
ahocevarcommented, Sep 30, 2019

@nikess Should be done in a week or so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance regression in calling getImageData (HWA)
It uses getImageData iteratively to select geometries on a map. The change has a performance cost of somewhere around 50-100x based on my...
Read more >
Chrome 77 Breaking Drag and Drop Events - Hacker News
Finally tracked it down to this obscure bug in Chrome 77 which re-orders drag and drop events but only when your page is...
Read more >
New in Chrome 77 - Chrome Developers
Chrome 77 is rolling out now! There's a better way to track the performance of your site with Largest Contentful Paint.
Read more >
2022 - Chrome Releases
Hi everyone! We've just released Chrome Dev 110 (110.0.5476.3) for Android. It's now available on Google Play. You can see a partial list...
Read more >
Chrome SameSite cookie behavior effect on customer ...
Describes a potential disruptive impact to customer applications and services because of a change in cookie behavior in Chrome browser ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found