[FR]: Optimise Node Storage
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #182 by @drowaudio — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- performance
Research direction
Start with the node base class and the GraphNode/prepareToPlay path to see how output buffers are allocated and how setAudioOutput replaces filling a buffer. The remaining unchecked targets are SummingNode and FadeInOutNode, plus the shared-empty-buffer ideas for SinkNode and ReturnNode; the checked list (TrackMutingNode, RackInstanceNode, ReturnNode, PluginNode) shows the pattern already used. Note PR #182 is closed and unmerged, so check what it attempted before starting. Done means the listed nodes stop allocating in prepareToPlay and reuse the input buffer, with tests still passing.
Written by the indexing model from the issue text.
Description
In some places, Nodes will be part of a straight chain.
In these places, if no other Node is dependant on the input, a Node can simply use the input Node's buffer.
In order to do this, we can check in prepareToPlay if any Nodes in the graph reference input and if not, set the optimisations to "don't allocate". We can then get the source buffer in process and call setAudioOutput instead of filling it.
This is in place in some locations already but the above is an addition that should make it unnecessary to even allocate the memory in the first place.
- TrackMutingNode [172] (saves 88,400B)
- RackInstanceNode [80] (saves 73,840B) (use source buffers if single output)
- ReturnNode [79] (saves 672,880B) (can disable allocation in prepare if there is valid input, otherwise it will be empty)
- RackReturnNode [72] (saves 74,880B) (use source buffers if single output)
- PluginNode [79] (saves 67,600B) (use source buffers if single output)
- LevelMeasurerProcessingNode [21] (saves 21,840)
- SummingNode [89]
- FadeInOutNode
Other optimisations
- SinkNode (can have a shared empty buffer and set this as the output)
- ReturnNode [?] (can have a shared empty buffer and set this as the output)
- Nodes receiving sink nodes and skip them to avoid adding silence
N.B. The above could have problems if a Node tries to steal its buffer and write over it. We would need some mechanism for preventing this.
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 222
- Avg merge
- 15h 44m
- Merged PRs (30d)
- 33
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Tracktion/tracktion_engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Tracktion/tracktion_engine#475 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Tracktion/tracktion_engine#476 · 5 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Tracktion/tracktion_engine#474 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Tracktion/tracktion_engine#473 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 56/100
Tracktion/tracktion_engine#460 ·
Maintainers usually reply within 1 day
All issues in Tracktion/tracktion_engine
Similar issues
-
cudf-polars feature request
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 2 days
-
(S1 - Need confirmation)
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
CleverRaven/Cataclysm-DDA#89212 ·
Maintainers usually reply within 1 day
-
Status: Needs confirmation Status: Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
a byte order mark at the start of a migration makes dbmate miss the up blockPossibly taken @Dem1241 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
ai_p2 comp-dictionary
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/ClickHouse#127261 ·
Maintainers usually reply within 1 day