Lalit Maganti

Lalit Maganti

@lalitm.com

Founding engineer @ http://perfetto.dev Writing @ http://lalitm.com Building devtools like syntaqlite, buildprof in my spare time Senior Staff SWE @ Google

285 followers3 following98 posts

Opus 5 just did the dumbest thing I've seen from it so far. For buildprof, my build tracer, I was switching from a JSON-based macOS API (eslogger) to a fast binary one (kdebug). My output is protobuf. Opus wrote: binary -> JSON -> protobuf This is why I still read the code.

syntaqlite, the very fast SQLite formatter just got another 19% faster. Someone reported a functional bug but fixing it made me realise if I restructured the AST slightly, a pile of simplifications fell out for free.

I made a tool that shows where the time goes when you compile software. It’s called buildprof. Run it in front of any build command and it puts every process the build spawns on a timeline. It doesn’t care whether the build is Cargo, Ninja, Make, Zig or a pile of shell scripts.

View full thread

When I replayed Bun’s Zig build, one linker invocation ran alone for two-thirds of it. What the heck was it doing for all that time? The short answer is Full LTO, and not just in Bun’s own code. The long answer is a whole rabbit hole, so I wrote it up: lalitm.com/post/buildpr...

lalitm.comI made a build profiler to understand Bun’s compile timesI built buildprof (Github), an open-source tracing tool that shows where the time goes when you compile software on Linux. Here’s a realtime video of it profiling a clean build of ripgrep: Watch the …

It uses ptrace under the hood, the UI is a customized Perfetto UI, and it’s Linux only for now. It’s open source and I plan to keep working on it. If you have a build that annoys you, give it a try. I’d love to hear what you find. github.com/LalitMaganti...

github.comGitHub - LalitMaganti/buildprof: Records every process and file access in a build and shows it as an interactive timelineRecords every process and file access in a build and shows it as an interactive timeline - LalitMaganti/buildprof

I made a tool that shows where the time goes when you compile software. It’s called buildprof. Run it in front of any build command and it puts every process the build spawns on a timeline. It doesn’t care whether the build is Cargo, Ninja, Make, Zig or a pile of shell scripts.

I built it because of claim that Bun’s new Rust build compiled 5× faster than its old Zig one; that just didn’t sit right with me. Zig projects usually build much faster than Rust ones. I wanted to see where the time was actually going.

Got very interested in the performance of parsing of large Perfetto traces as I do once every few months. Managed to shave ~30% of the parse time of traces containing lots of typed arguments, common in traces from Chrome and AI workloads.

Correlating profiles across different machines usually involves a lot of painful window-switching. Here’s a quick demo of doing it in Perfetto instead: two separate profiles, aligned on one timeline in a few clicks.

The trace merging feature in Perfetto v58 has a lot of cool applications: view independent traces from different VMs/devices, client-server interactions, and most topically, multi-rank and multi-machine PyTorch profiles. Cooking up a blog post about all of this, coming soon.

Lalit Maganti@lalitm.com

Perfetto v58 is out! We shipped a bunch of things: persistent CLI analysis sessions for agents, zstd compression, better memory tools and more. Biggest feature though is trace merging: multiple traces on one timeline, including across VMs and devices. github.com/google/perfe...

Perfetto v58 is out! We shipped a bunch of things: persistent CLI analysis sessions for agents, zstd compression, better memory tools and more. Biggest feature though is trace merging: multiple traces on one timeline, including across VMs and devices. github.com/google/perfe...

github.comRelease Perfetto v58.2 · google/perfettoWe’re excited to share Perfetto v58.2! This release makes it possible to merge traces from different machines onto one timeline, introduces Memscope and Memory Overview for end-to-end memory invest...

Got a really fantastic comment on HN which I think perfectly captures the essence of my thinking.

Lalit Maganti@lalitm.com

The staff engineering post I wrote a couple of weeks ago is currently #1 on Hacker News, which is a nice surprise. If you missed it: lalitm.com/post/find-pr...

1/5 I've been on Opus 5 for a week and noticed the code comments stopped using em-dashes. It's all double hypens (--) now. Decided to do some analysis to confirm I wasn't fooling myself...

View full thread

4/5 Weirdly this only seems to affect code comments, not writing in general. I see just as many em-dashes as ever in chat replies.

5/5 Caveat: the samples of Opus 5 is small; mainly because I don't particularly like using it (mainly been using Sol but I ran out of usage for the week!)

1/5 I've been on Opus 5 for a week and noticed the code comments stopped using em-dashes. It's all double hypens (--) now. Decided to do some analysis to confirm I wasn't fooling myself...

2/5 My methodology: agentsview indexes all my conversations into an SQLite database so I can just run some queries to count comment lines with -- vs em-dashes.

3/5 What makes me so sure it's the model? I have a specific session where I *switched* from Fable to Opus 5 *mid conversation*. When Fable was running, 11-emdashes in comments. With Opus 5, 36 double hypens. I didn't touch anything else...

PyTorch profiles are going to look much better in the upcoming release of Perfetto. Their events lack enough hierarchy, so Perfetto has to guess the layout. We now pack the tallest slice stacks first, making the same trace far more compact. Full explainer at lalitm.com/post/pytorch...

Once again relevant due to today's GitHub outage!

Lalit Maganti@lalitm.com

There are plenty of places to host a Git repository, but remarkably few places to host an open-source community GitHub’s moat is its shared identities, conventions and paths to discovery. Any replacement must rebuild that social layer, not merely offer better hosting. lalitm.com/post/github-...

I'm quite shocked there doesn't seem to yet be a high quality "remote control" solution for Pi. I'm *not* looking for something wrapping Pi; just an extension to monitor the state of agents from my phone. Everything I've tried left me quite disappointed...

A day-to-day game-changer of LLMs is the ability to design really exhaustive benchmarks. This is the sort of thing I would have just been too impatient to do before. For example, I've spent around 30 minutes iterating and I've ended up with this...

Junior engineers often ask me: “How can I demonstrate ownership when my manager hasn’t given me anything to own?” The question treats responsibility as something that must be given first. But when a TL gives you responsibility, they also accept the consequences of your decisions.

lalitm.comResponsibility Is Taken Before It Is GivenTo get promoted as a software engineer in Big Tech, you generally need to show “ownership” of a product or area. This means being responsible for it and deciding what should happen over time. I often ...

Before doing so, a TL asks: “Does this person deal with problems the same way I would, or better?” You demonstrate that judgement in small increments, within your existing scope. Formal responsibility is a trailing indicator. More at lalitm.com/responsibili...

After nine years maintaining Perfetto, I’ve found most users want a reliable tool so they can focus on the problem they opened it to solve. I expect personalization to grow around maintained cores and extension points. More at: lalitm.com/post/changin...

Warm takes: * Opus 5 wordieness and jargon is *incredibly* frustrating to work with * Fable is too slow without being much better at many of the tasks I do day to day * I've found it difficult to tell apart the Opus models since 4.6 * Sol 5.6 is much more pleasant to work with *but*...

* Deepseek v4 Flash 0731 reminds me a *lot* of Opus 4.6 and is a *really* pleasant (and fast!) model to use * Deepseek is also *incredibly* cheap; I genuinely think I could use it at full tilt at API prices and it would be competitive with Claude/Codex subscriptions

There are plenty of places to host a Git repository, but remarkably few places to host an open-source community GitHub’s moat is its shared identities, conventions and paths to discovery. Any replacement must rebuild that social layer, not merely offer better hosting. lalitm.com/post/github-...

lalitm.comGitHub has alternatives, but no replacementCodeberg, a Git code hosting platform, recently took a decision to prohibit projects that mostly consist of generative-AI-written code which has prompted concern and extensive discussion elsewhere. Th...

I wrote last month: > (...) open-source projects cannot afford to have a dedicated team doing security scanning for them (...). we’re going to see a lot more innovation in this space, including from the big AI labs. And now, OpenAI announces Codex Security: github.com/openai/codex...

github.comGitHub - openai/codex-security: SDKs and CLI for Codex SecuritySDKs and CLI for Codex Security. Contribute to openai/codex-security development by creating an account on GitHub.

antirez says expert programmers using AI should think of themselves as Linus, with agents as the subsystem maintainers. The part that doesn't work for me is trust. Linus's maintainers spent years proving their judgment. I've given LLMs that chance plenty of times and I keep regretting it.

lalitm.comAI agents are not subsystem maintainersAntirez, the creator of Redis, recently argued that expert programmers using AI should think of themselves as being Linus Torvalds. The key part of his analogy is this: Automatic programming, instead,...

I let problems accumulate rather than acting immediately. Some fade; others recur across teams or connect with issues that seemed unrelated. Over time, I see what’s really slowing people down and what might be worth building. Blog post here: lalitm.com/post/find-pr...

git has an experimental git history command as of 2.54/2.55 and it deserves more attention. Fixup, reword, or split a commit buried in your stack, and every branch built on top rebases automatically. It's already in core git, nothing to install. lalitm.com/post/git-history/

lalitm.comThe git history command deserves more attentionWorking with lots of changes in parallel on git can be painful. You end up juggling branches and commits, and running scary rebase -i commands that can leave your tree in a half-broken state if you so...

Wrote up a blog post going over the "why" in each of the features in Perfetto v57. This is something I plan on doing for each release going forward (including dedicated posts when a feature is big enough to deserve it!) Find it at lalitm.com/post/perfett...

lalitm.comPerfetto v57: fixing PyTorch traces, plus journald logs and an AI skillWe just released Perfetto v57 and I wanted to share the new things I’m most excited about. This is something I wanted to do for past releases but I just never quite got round to it. It’s also somethin...

Beyond this issue, there's a bunch of new features and quality of life improvements: * a new AI skill for recording and querying traces for coding agents * support for collecting systemd journald events on Linux * support for querying https traces without downloading them first!

I just published syntaqlite 0.6 (github.com/LalitMaganti...), now supporting SQLite dot commands, a big step forward for usability in the real world. That along with Pyiodide support makes it the most impactful release since 0.1! Wrote about this at lalitm.com/post/syntaql...

github.comRelease v0.6.0 · LalitMaganti/syntaqliteShell file support: syntaqlite now understands SQLite shell scripts: files that mix .dot commands with SQL. The embedded SQL is extracted and the surrounding shell syntax is ignored, so ast, fmt, ...

I discovered Iroh (www.iroh.computer) yesterday and it's a really neat project! But from reading discussions on HN/lobsters, people seem really confused on exactly what it is. I wrote up a TIL after investigating a bit: lalitm.com/post/til-iroh/. TLDR, it's like a VPN but at the app layer!

lalitm.comTIL: Iroh: peer-to-peer networking for app developersI came across Iroh (via, via) today as it hit 1.0 and found it a really interesting solution to a problem I knew existed but had not thought a lot about. Judging from the comment sections, it seems pr...