New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap rather than mutate input data? #13
Comments
Could you make use ImmutableJS or another implementation of persistent data structure so that we may leverage the efficiencies of structural sharing? I went down the HTML5 Structured Cloning approach and it works well with D3 EXCEPT it is really slow to clone in general. Persistent Data Structures like those implemented by ImmutableJS are extremely memory efficient and immutable by design. It also allows for rendering optimization with React due to mutation creating a a new reference identity and being able to use reference equality to determine if two deep tree structures are equal without comparing the actual tree data. Given React is being used more and more in general UI development, it may make a lot of sense to use ImmutableJS. @leeb (on twitter) is the maintainer of that library. Cheers Marc |
If not using ImmutableJS then maybe D3 will have its own implementation of HAMT...? I trust your choice will focus on performance... http://blog.mattbierner.com/hash-array-mapped-tries-in-javascript/ |
Fixed in #14. |
Related d3/d3#1145 d3/d3#1929.
Also this was my “#1” regret on my AMA.
The text was updated successfully, but these errors were encountered: