Skip to content

Tachyon recordings as animated SVGs instead of GIFs #162388

Done

Description

@kdeldycke

Documentation URL

https://docs.python.org/3/library/profiling.sampling.html#live-mode

Documentation

Python 3.15 added Tachyon, and document its --live mode with 2 GIFs since #142676 . These have been evaluated as too big (#159102) and attempts have been made to change their format (#159169).

This issue propose to distribute them as animated SVGs instead:

tachyon-live-mode-1 tachyon-live-mode-2

This reduce the size of these assets:

GIF (now) SVG
tachyon-live-mode-1 822,727 B 304,418 B
tachyon-live-mode-2 965,522 B 347,052 B
Both, xz-compressed, as in the .tar.xz 1,743,920 B 34,528 B

Being SVGs, they also renders sharp and are scalable at any resolution.

These assets have been rendered with this click-extra one-liners (a project I am maintaining for more than 5 years):

For tachyon-live-mode-1.svg:

$ uvx 'click-extra==10.3.1' screenshot --record --columns 120 --rows 47 --start 6 --end 10 --hold 0 --blank 0 --preset plain --prompt '' --watermark '' --margin 0 --padding 0 --shadow none --border none --output tachyon-live-mode-1.svg -- python3.15 -m profiling.sampling run --live --all-threads --sampling-rate 10khz --opcodes -m test test_gc test_threading test_list test_dict

For tachyon-live-mode-2.svg:

$ uvx 'click-extra==10.3.1' screenshot --record --columns 120 --rows 47 --start 6 --end 10 --hold 0 --blank 0 --preset plain --prompt '' --watermark '' --margin 0 --padding 0 --shadow none --border none --output tachyon-live-mode-2.svg -- python3.15 -m profiling.sampling run --live --all-threads --sampling-rate 10khz -m test test_gc test_threading test_list test_dict

Linked PRs

Activity

  1. added
    docs
    on Nov 21, 2026
  2. added
    stdlib
    on Nov 21, 2026
  3. hugovk commented on Nov 21, 2026

    @hugovk
    Member

    Please can you open a PR so we can see the build preview?

  4. kdeldycke commented on Nov 21, 2026

    @kdeldycke
    ContributorAuthor

    Please can you open a PR so we can see the build preview?

    Ah cool! I wasn't sure that my proposal was good enough to be considered that why I opened an issue first. But sure, I can work on a PR to test drive the integration in the docs and see the real results.

  5. added 2 commits that reference this issue on Nov 21, 2026
  6. added a commit that references this issue on Nov 25, 2026
  7. zware commented on Nov 25, 2026

    @zware
    Member

    Much better solution, thank you @kdeldycke!

  8. added a commit that references this issue on Nov 25, 2026
  9. kdeldycke commented on Nov 26, 2026

    @kdeldycke
    ContributorAuthor

    Thanks @zware @hugovk @pablogsal for the fast review, tests and merge!

    Now that we validated that animated SVG plays nice with our documentation pipeline, do you want me extend my search for other assets? The Tachyon were symptomatic and I stumbled onto them while reading the 3.15 changelog, that's why I targeted them. But maybe I can do the same for other static terminal JPEGs or PNGs? Or is this not worth the effort?

  10. hugovk commented on Nov 26, 2026

    @hugovk
    Member

    Up to you! You can have a check, but we might be less likely to change those, as the benefit is probably not as big as it is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsstdlibtopic-profiling

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions