leaflet-plugins icon indicating copy to clipboard operation
leaflet-plugins copied to clipboard

Very poor performance with KML transparency

Open f00dl3 opened this issue 9 years ago • 4 comments

When setting a KML to have a alpha color value, the L.KML will render the KML layer transparent, but it suffers severe performance issues.

If the KML is referencing a animated GIF, the animation is not smooth - even on a 8-core 4790k w/ 16 GBs of RAM and Ubuntu 16.04. Performance is even worse on Android. Without the override in the KML, performance is smooth. It's the alpha transparency that causes the issues.

Let me know what if any logs could be of use to help isolate why KML transparency / alpha is such a CPU hog...

f00dl3 avatar Aug 25 '16 20:08 f00dl3

Do you play with a simple placemark icon or a groundoverlay ? I think it would be same if you put your gif as a simple image overlay since it's what is doing the kml script on leaflet map.

brunob avatar Aug 26 '16 13:08 brunob

It's a ground overlay. https://github.com/f00dl3/Samples/blob/master/RadarB.kml

f00dl3 avatar Aug 26 '16 15:08 f00dl3

As i said, groundoverlay use a simple image overlay, so i'm pretty sure that your map would be laggy with the same image as a leaflet image overlay. Can you try this on a fiddle ?

brunob avatar Aug 26 '16 15:08 brunob

Just tested your kml, and from my side it works well and smoothly...

brunob avatar Aug 26 '16 15:08 brunob