[Matplotlib-users] How can I speed up a tricontourf call ?

Thomas Caswell tcaswell at gmail.com
Thu Sep 1 13:21:20 EDT 2016


If you have the RAM for it I would look at something like image pyramids
https://en.wikipedia.org/wiki/Pyramid_(image_processing) + some LRU caching.

Tom

On Wed, Aug 31, 2016 at 1:08 PM Francis Chabouis <fchabouis at gmail.com>
wrote:

> Hello,
> I'm working on this travel times project :
>
>
> https://ubikiwi.com/ouhabiter?locations=[[48.85522811385678,2.332191467285156]]
>
> and the contouring is done thanks to MPL tricontourf function (thanks!).
> As you can see it works pretty well and is fast enough.
>
> As I'm trying to expand the geographical coverage of the application (the
> whole country) I'm having performance issues with the contouring:
>
> - if I load the triangulation in memory at startup, it takes a huge amount
> of RAM. But the real problem is that even a very small contour in this huge
> triangulation takes a very long time to produce. For example with a small
> triangulation, a 20 minutes walk isoline is instant. The same contour on a
> country-wide triangulation takes 6sec. (It is not that long, but for a web
> application it is).
>
> - If on the other hand I compute a triangulation for each request, the
> contouring is fast but the triangulation creation is slow.
>
> Would someone have an optimisation idea ?
> Is it somehow possible to speed up the triangulation ?
> Any possible alternative ?
>
> Thanks a lot,
> Francis
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160901/c675e3de/attachment.html>


More information about the Matplotlib-users mailing list