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

Francis Chabouis fchabouis at gmail.com
Wed Aug 31 13:08:11 EDT 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160831/8348804d/attachment.html>


More information about the Matplotlib-users mailing list