Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

optimizing rendering of many points #1651

springmeyer opened this Issue Dec 14, 2012 · 3 comments


None yet
2 participants

springmeyer commented Dec 14, 2012

One case that needs optimized (after the markers refactoring to allow dynamic transforms, recoloring, and svg rendering) is the rendering of millions of similarly styled points that can overlap.

In general the machinery for dynamically coloring could be fixed to work faster if points are the same color and size.

And THIS IS MAJOR, the default behavior of caching placements to avoid collision will lead to major memory usage unless both marker-allow-overlap:true and marker-ignore-placement:true are both set.

In this case we:

  • Must fix #1359 before worrying about other bottlenecks
  • Could look into caching the bitmaps of rendered svg
  • Could look into savings from re-using rendering objects (unlikely to help)
  • look for bottlenecks in quad tree impl, based on it appearing to be a culprit when allow-overlap:false: https://gist.github.com/4288487 | https://gist.github.com/4288503
  • return early in markers dispatch add_path if detector_.has_placement(transformed_bbox) returns false (before calculating label placement).
  • recommend setting marker-stroke-width:0 to disable stroking of outlines.
  • What else?

whyvez commented Jun 18, 2014

I am currently working on a project that might be a good fir to work on this issue. Rendering millions of point in a heat map type visualization using tilelive. Can I help?


springmeyer commented Jun 19, 2014

yeah, pushing all data/styles to a standalone testcase that is easy to set up and run would be great. After that providing profiling traces can be really useful to see what is taking up time: https://gist.github.com/springmeyer/2945049

@springmeyer springmeyer removed this from the Mapnik 3.x milestone Jul 29, 2014

@springmeyer springmeyer referenced this issue in tilemill-project/tilemill Nov 19, 2014


Postgis Plugin: Errors #2441


springmeyer commented Dec 17, 2014

closing, the easy and elegant solution here is to just create a new symbolizer with reduced scope which will be dead easy to have perform fast: #2611

@springmeyer springmeyer added this to the Mapnik 3.x milestone Dec 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment