'Poor GeoTIFF display performance using JS plugins contrary to Leaflet for R package

I have question regarding displaying GeotTIFF using leaflet or react-leaflet.

There are some packages allowing displaying tiffs, for example I had used:

https://github.com/stuartmatthews/leaflet-geotiff

https://github.com/IHCantabria/Leaflet.CanvasLayer.Field

Both of them are great but regarding performance they are much slower than using leaflet for R package.

https://rstudio.github.io/leaflet/raster.html Scroll down to example on this site.

Why is that displaying Tiff in Leaflet for R is much faster than in Java Script? Are there any solution to achieve something similar in JS?

Saying that I tried displaying same bunch of geotiffs in every cases and R is much faster than both of plugins. I need solution to be in JS.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source