Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove the DOM nodes recycling pool #2122
This is an alternative to #1675 which removes the recycling pool altogether. I couldn't find the time to properly benchmark the change, but other libs (among the fastest ones) have dropped that approach since it didn't bring them any significant advantage.
The pool makes the whole
I've left the tests in place (with some modification to assert that nodes are not recycled). If we decide to commit to this approach in the long run we can remove them too (I'd rather keep them in for now).
Edit2: I also removed the corresponding benchmark.
@pygy I'll note that even though it technically is faster if you do it right and are already fast enough that node allocation becomes a real bottleneck (Inferno saw dramatic 2-3x increases, but Mithril might see a 20% increase), it complicates code and makes user behavior much less predictable. That's the main reason libraries don't like to keep it (Inferno silently dropped it for v4), and the few that do offer it usually keep it disabled by default.
Ran the benchmarks 3x in Chrome 65