News for hackers. Stuff that matters.
Re:Introducing d3-scale by zschuessler on Monday December 28, 2015 @05:14PM (#10803713)
Hi Mike!

Great open source work. I've used d3 on many projects and, perhaps interesting to some, have used it often not as a charting library, but as a view/event model for DOM manipulation with advanced UI requirements (think dc.js and crossfiltering). This is after noticing that d3 works with large data sets very quickly - even those directly adding, removing, and editing DOM nodes & data.

My question for you is, broadly, where the speed of DOM manipulation comes from. Typically DOM interactions are very expensive in terms of execution time. I searched the docs and very briefly the source code to no avail.

Cheers, and thanks for open sourcing your work. It has been invaluable to my projects.

Re:Introducing d3-scale by mbostock on Monday December 28, 2015 @06:06PM (#10803993)
The speed comes from doing less. :) Selections are designed so that you only modify the parts of the DOM that need to be updated, and don’t waste effort touching parts that are unchanged. The downside is that it can be more work for you, since D3 (unlike, say, React) relies on you to tell it what needs updating, rather than computing it automatically. But in my experience that trade-off is often worth it.
Re:Introducing d3-scale by zschuessler on Monday December 28, 2015 @06:28PM (#10804117)
One more question from a lady at the airport listening g to me talk about d3 and some back story:

You've had the opportunity to monetize d3 in the beginning, yet didn't (paid model). When it garnered reputation, you didn't implement freemium or other cost-free models. (Ads, consulting, enterprise, etc)

At all stages you didn't monetize even when it'd be deemed fine. Why?

Re:Introducing d3-scale by megalodon on Tuesday December 29, 2015 @08:35AM (#10806571)
I don't know why, but as a student developer I really appreciate not bloating it with ads or freemium or whatever. I am of the opinion that scientific tools are best developed non-profit and open-source.