V3: Removed indirection from asset graph#298
Conversation
f72eb16 to
ee85e3e
Compare
There was a problem hiding this comment.
Separated this into a dedicated function, removed recursion and removed the closure. I removed the closure because it's annoying to deal with move semantics in the closure - particularly as we refactor the request tracker approach in the future.
There was a problem hiding this comment.
This is more a concern for the binding layer rather than of the AssetGraph itself. Extracted it into a function, should probably move it into node_bindings
There was a problem hiding this comment.
We have a lot of serialisation baked into the core types already, but it can go in either location 🤷
There was a problem hiding this comment.
Trying to keep this data structure focused on being a holder of data and minimize manipulation of that data in methods.
Essentially, this is just a graph with add/get methods, consumers decide what to do with the data so the details of manipulations to the data live at the call site
9d32054 to
6950a0f
Compare
6950a0f to
9f71dd0
Compare
| } | ||
|
|
||
| first_asset | ||
| } |
There was a problem hiding this comment.
The AssetGraph looks like:
root -> (n) dependency -> (n) asset (entry)
This will walk the graph and find the first asset which should be the entry asset
AssetNodeandDependencyNodestored directly in theAssetGraphavoiding the need for externalVec<_>and tracking both thenode_indexandvec_indexAssetGraphonly handle data storage and operation on the data structure are externalized and done at the call site.**_idxnaming convention for node indexes in the graph