Merge pull request #1181 from barneycarroll/patch-4

Gotchas imply onbeforeupdate is inherently evil
This commit is contained in:
Leo Horie 2016-07-30 21:29:53 -04:00 committed by GitHub
commit 608a494538

View file

@ -252,7 +252,7 @@ var WorkingComponent = {
#### Avoid premature optimizations
The `onbeforeupdate` hook should only be used as a last resort. Avoid using it unless you have a noticeable performance issue.
You should only use `onbeforeupdate` to skip diffing as a last resort. Avoid using it unless you have a noticeable performance issue.
Typically performance problems that can be fixed via `onbeforeupdate` boil down to one large array of items. In this context, typically "large" means any array that contains a large number of nodes, be it in a wide spread (the infamous 5000 row table), or in a deep, dense tree.