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.

Multiple readback operations can be made faster.

See original GitHub issue

Hi there, just working on a Quagga2-based product, and came across this warning in the dev tools. Is there a reason that this is not changed/implemented for performance?

Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. [quagga.min.js:3]

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
sam-the-programmercommented, Oct 20, 2022

Thanks

3reactions
ericbladecommented, Oct 20, 2022

I haven’t ever seen that, and had no idea of it’s existence.

A boolean value that indicates whether or not a lot of read-back operations are planned. This will force the use of a software (instead of hardware accelerated) 2D canvas and can save memory when calling [getImageData()](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData) frequently.

It does look like getImageData is used every frame grab, which might perhaps make a difference there, though it might be rather hard to quantify.

My guess would be that either that option didn’t exist when this code was originally written, was not known by the original author, or was determined to not be helpful?

i real quick traced out the probably relevant getImageData triggering that to frame_grabber_browser … not sure exactly where the relevant getContext(‘2d’) call is though.

I’ll try to take a deeper look at it next time i’ve got some time to work on this, i always like easy performance improvements 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Canvas2D: Multiple readback operations using getImageData ...
Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true warnings. Save this ...
Read more >
Canvas2D: Multiple readback operations using getImageData ...
Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true.
Read more >
Fehler #2243 - uBlockOrigin/uBlock-issues - GitHub
Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true.
Read more >
Section 4. ATC Clearances and Aircraft Separation - FAA
If ATC issues a clearance that would cause a pilot to deviate from a rule or ... When conducting an IFR operation, make...
Read more >
Improve the performance of Mapbox GL JS maps | Help
This strategy works well when you have data coming from many individual data files. You can combine vector tile sources by either using...
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