-
Notifications
You must be signed in to change notification settings - Fork 18
Description
hiya - thanks for your library, it is very nice, and I use it in https://github.com/time4tea/gopro-dashboard-overlay
as the rendering code in my project gets called a lot - i was looking for places that I could make some easy gains in performance - so i ran the rendering code in viztracer.
as you can see there is quite some time spent in PIL imagedecode - this seems to be because the cache in the system caches the data files, but there is no image cache in the library. When drawing maps in my program we reuse map tiles a lot, as the map is moving pixel by pixel around the place.
i couldn't find a good place to put an image cache in, so i kind of bodged it, and ended up with a trace that looks like this:
you can see that the time to create the image is much reduced - from about 7.5ms to about 1ms - assuming a cached tile.
The code is smashed in right now, so no prizes for quality - but you are welcome to it if it is useful for you.
https://github.com/time4tea/gopro-dashboard-overlay/blob/geotiler-perf/gopro_overlay/geo_render.py
It is a "drop-in" replacement for the geotiler.render_map (at least how I use it)
Hope this is useful/interesting - anyhow thanks for making a nice library.
Cheers!
James

