@djsmith42
Dave Smith
+
=Speed
1
I was going to tell a hilarious joke, but I didn’t know how the audience would … react
Engineering
intersection
science
economics
is the
of
and
Science
Economics
Engineering
“I don’t think you are measuring what you think you are measuring.”
--Miško Hevery to me.
About this talk.
Twice.
Performance is hard.
“Is React faster than Angular?”
Useless Question
React in 90 seconds
Application State
Virtual DOM
Plain old JavaScript objects
Your JavaScript
Code
React Reconciler�and�Renderer
Browser DOM
Optimized DOM operations
React in 90 seconds
Premise: The modern DOM is dangerously unperformant.
Links for Later
Pete Hunt explaining Virtual DOM:
https://www.youtube.com/watch?v=x7cQ3mrcKaY#t=1207
Virtual DOM diff algorithm:
http://facebook.github.io/react/docs/reconciliation.html
Referential transparency:
http://en.wikipedia.org/wiki/Referential_transparency_(computer_science)
The obvious conclusion?
React
all
the
things!
It’s not that simple.
React
some of
the
things?
The Tragedy
New column
Look, a nested list!
So I did some
advanced
performance
mathematics
Slow ng-repeat table
+
Nested ng-repeat
=
Really slow ng-repeat table
React
to
the
rescue!!!11
wat
Our attempt
React components
Result:
+
1
=
Why did this fail?
Fast forward one year to...
The Glory
+
?
1
=
Demo
Drawbacks
Where React Shines
Where React is Weak
One more thing...
Angular 2
is fast.
Really fast.
Conclusion
Do your own engineering
Measure
Observe
Decide
@djsmith42
Links