Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[FR]: Optimise Node Storage

Open
#173 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tracktion/tracktion_engine

All issues in Tracktion/tracktion_engine

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.