Stream: compiler development

Topic: change stack trace frames


view this post on Zulip Anton (Jul 13 2026 at 18:01):

Our Debug builds burn ~80% of compile time capturing a 6-frame stack trace on every alloc (the leak-checking DebugAllocator, on macOS arm64), this is what's timing out the JSON CLI tests here.

If we set stack_trace_frames = 0, we get:
JsonStringEscapes 57s→3.6s
JsonEncodeRoundTrip 89s+→11s
snapshot tool (minici) 70s→16s
(leaks are still detected)

I propose we add a flag -Ddebug-gpa-traces (default off) to build_options, point every first-party DebugAllocator at it, and when a leak fires in a traceless build we print a hint to rebuild with the flag for alloc-site traces. We can automate this in CI if desired.

view this post on Zulip Richard Feldman (Jul 13 2026 at 18:18):

agreed!

view this post on Zulip Luke Boswell (Jul 13 2026 at 19:13):

Great idea

view this post on Zulip Anton (Jul 13 2026 at 19:15):

I've started on the implementation by the way, I'm curious for the CI speedup :eyes:

view this post on Zulip Anton (Jul 13 2026 at 22:11):

56->45 min on minici ubuntu 24 and 1h16->1h7 on macos :)
PR#10136

view this post on Zulip Richard Feldman (Jul 13 2026 at 22:26):

nice!


Last updated: Jul 23 2026 at 13:15 UTC