2 ms·
There are a few extra performance tricks we can do behind the scenes here. - Chrome's implementation won't actually perform a raster at this stage, instead we'
by bfgeek 9y ago
There are a few extra performance tricks we can do behind the scenes here.
- Chrome's implementation won't actually perform a raster at this stage, instead we'll raster later on a background thread. toDataUrl, etc will raster.
- We'll only invoke the paint method for things which we actually need to paint. E.g. if you have a long list, we won't invoke the method for things that are outside the paint window (things off-screen).
- We'll have the ability to add a bunch of caching later on. From memory the servo folks in their experimental implementation actually speculatively generated a bunch of images ahead of time.
- We are actively investigating moving this to a background thread. So even if your main thread is janked, an animation which triggers a paint worklet, will still run at 60fps.
edit - formatting.