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

Stack trie inner_fmt is slow

Open
#96 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
cli, performance

Research direction

Start by reproducing the large structured-log case with --plain-text and profiling the stack trie inner_fmt path using cargo flamegraph. Compare the formatting work added by commit 9cfe1d0fdd48fd1f820fe9f06a137207198724d1 on compilation metric pages, and consider whether Rust-side optimization or deferred JavaScript formatting provides a measurable improvement.

Written by the indexing model from the issue text.

Description

As tlparse outputs get larger, I start noticing that tlparse itself is slow for large (>100MiB) structured logs.

I did a quick profile using cargo flamegraph to see what takes the most time in tlparse (assuming --plain-text).

Here's the flamegraph:

Image

https://github.com/pytorch/tlparse/commit/9cfe1d0fdd48fd1f820fe9f06a137207198724d1
adds stack trie mini stacks to every compilation metric page. Turns out, doing this is pretty slow overall.

I think internally, downloading/uploading is still the majority of the time spent in tlparse, so this isn't super urgent. But might worth considering if we can optimize this better (for example, instead of formatting on rust side, we could inject javascript to do the formatting when the user opens the page instead)

Dominant language
Rust
Stars
94
Forks
28
PR merge metrics
No merged PRs in 30d

Getting set up

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 meta-pytorch/tlparse

All issues in meta-pytorch/tlparse

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.