-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Perf: Implement flag driven update dependency graph (#103)
![dependency-graph](https://github.com/lightning-js/renderer/assets/6070611/c280c45e-e077-46bb-b477-16ad144645fb) Updates to cached calculated data within a CoreNode is now updated according to the above dependency graph. New optimizations: - Positioning, sizing and scaling properties now set an `updateType` (formerly `recalculationType`) flag to indicate an update is needed to their corresponding matrix. - Children are not visited unless their `updateType` is flagged with `Children` - Any updates to a CoreNode efficiently flags all ancestors up to the root with `Children` - Children are not visited if their own `updateType` is 0. - World Alpha is now update cached. - Premultiplied Alpha-merged colors are now update cached. - Calculated Z-Index is now update cached. Other changes: - TypeDocs output folder renamed from `docs` to `typedocs`. - New `docs` folder checked in containing manually written documentation. - Added documentation about the Node Dependency Graph On a RPI test, this took a resolution=1080, multiplier=1, overlay=false `stress` test from about 40-41 fps to 42 fps.
- Loading branch information
Showing
10 changed files
with
322 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
node_modules | ||
.DS_store | ||
.idea | ||
docs | ||
typedocs | ||
dist | ||
dist-cfg | ||
dist-vitest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Node Depenedency Graph | ||
|
||
The diagram below describes the reactive flow of inputs into cached calculated data elements that are updated during each `update()` of a Core Node. | ||
|
||
![Dependency graph describing by way of a water fall the input and output relationship of calculated (and cached) data elements of a node](./images/dependency-graph.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
https://lucid.app/lucidchart/f5c48c94-6096-44c5-bca2-97fe2b581095/edit?viewport_loc=-1167%2C-285%2C4800%2C2244%2Cm8WTkWxK2plY&invitationId=inv_44218a81-5bb9-4436-a5e6-5697c146e164 | ||
https://lucid.app/publicSegments/view/56aa76d3-d7c2-4020-a3bc-8638084cb22b/image.png |
Oops, something went wrong.