3 ms·
Very cool! This bears quite a resemblance to the way React.js constructs a virtual DOM so that it can optimize drawing. Do you guys have a way you're benchmarki
by rgbrgb 12y ago
Very cool! This bears quite a resemblance to the way React.js constructs a virtual DOM so that it can optimize drawing. Do you guys have a way you're benchmarking performance improvements? Are you just looking at time spent on the main thread?
- ScottGoodson 12y agoYes, there is a broad similarity: abstracting away from performance or threading limitations of common UI building blocks. However, React has a declarative, single-directional data flow model. AsyncDisplayKit is imperative. Declarative code is great for a lot of things, but interactivity and animations are definitely not one of them. Also, ASDisplayNode was designed to be as similar as possible to UIView (also imperative). We don't have a benchmark suite, largely because it is so easy to use Instruments to do CPU traces and look for any chunks of main thread work that threaten frame drops.