Skip to content

Add a performance guide - #202

Merged
ruccho merged 3 commits into
mainfrom
doc/performance-practices
Oct 29, 2026
Merged

ruccho merged 3 commits into
mainfrom
doc/performance-practices

Conversation

@ruccho

@ruccho ruccho commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds a guide that explains the cost of recording and how the encoding options affect it, in English (docs/performance-guide.md) and Japanese (docs/performance-guide.ja.md). The README links to it from the section on memory usage.

The guide covers the following:

  • Where memory is used during recording: the capture texture, the encoder, the buffer of encoded frames and the native allocator.
  • The CPU and GPU load of the blit and readback paths on iOS and Android.
  • The cost of creating a session and exporting.
  • The effect of the encoding size, the frame rate, the bitrate, the memory limit, the disk buffer and ForceReadback.
  • Recommendations based on these, and the measured values the descriptions are based on.

The guide describes the versions after v1.7.0, including #198, #199, #200 and #201.

  • The descriptions of the buffer of encoded frames, the export and the recommendations reflect those changes.
  • The tables of measured values were obtained with v1.7.0 on an iPhone 12 and a Galaxy S22, and are labelled as such.
  • A section "Changes after v1.7.0" lists the changes and the values measured after them on the Galaxy S22:
    • the managed heap and physical memory with a full buffer;
    • the managed heap after the session is disposed;
    • the longest frame during export;
    • the CPU time of the threads of the native library.
  • iOS was not measured again.

The CPU usage described for Android assumes native binaries rebuilt with the changes of #201, which the release procedure requires.

… recording and the effect of each setting

The guide describes where memory is used during recording, the CPU and GPU load of the encoding paths on iOS and Android, the cost of creating a session and exporting, and how the encoding options affect these. It includes the measured values on which the description is based. README links to it from the section on memory usage.
…hanged after v1.7.0

The guide now describes the versions after v1.7.0. The measured tables remain those of v1.7.0, and a new section gives the values measured after the changes on Android.
@ruccho
ruccho marked this pull request as ready for review October 29, 2026 07:31
@ruccho
ruccho merged commit 6e6f30e into main Oct 29, 2026
@ruccho
ruccho deleted the doc/performance-practices branch October 29, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant