Performance
See original GitHub issueLoren Petrich’s lib uses an algorithm that seems to be in O(n^2)
. It is unpractical for n > 1000. (d3-voronoi runs in O(n) log(n)
.)
See http://bl.ocks.org/Fil/704bdbac80ab2e5d741d5fa3662bdf82
Three possibilities:
-
- “I’m sorry, Dave, I’m afraid I can’t do that”: let geoVoronoi() log a warning if n > 500 (10s on my computer) and return an error if n > 2000 (2.5 min).
-
- Switch to an approximate algorithm when n > 500 (If we accept bugs around the poles, we can piggy-back on d3-voronoi by using a specific cylindric projection.)
-
- Find and implement a better algorithm.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Performance Definition & Meaning - Merriam-Webster
1 · the execution of an action · something accomplished : deed, feat ; 3 · the action of representing a character in...
Read more >Performance Bicycle - Your Next Best Ride
Shop road, mountain & gravel bikes. Huge selection of parts, components & clothing from Specialized, Shimano & more!
Read more >Performance - Wikipedia
A performance is an act of staging or presenting a play, concert, or other form of entertainment. It is also defined as the...
Read more >86 Synonyms & Antonyms for PERFORMANCE - Thesaurus.com
Find 86 ways to say PERFORMANCE, along with antonyms, related words, and example sentences at Thesaurus.com, the world's most trusted free thesaurus.
Read more >Performance (1970) - IMDb
Rock superstar Mick Jagger and James Fox star in this stunning reality/fantasy trip set. Play trailer ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s a notebook that seems to work, built on top of d3-delaunay. https://beta.observablehq.com/@fil/geo-delaunay
Computations are several orders of magnitude faster than the current d3-geo-voronoi.
(The notebook is not that fast, because rendering is slow.)
I added a mesh computation to my notebook, too. Edit: Ah, I see you’d already done this, too, and that I can simplify my code. 👍