Positive users praise Bun's clever scheduling of garbage collection after HTTP responses as an efficient optimization, while negative users complain about memory leaks and questionable CLI design.
Based on 7 visible X reactions from 31 accounts; directional sample.
Ask a question below.
Published answers will appear here.
@jarredsumner If the CLI itself needs garbage collection, rather than just process cleanup after call completion, that's a bad CLI.
@jarredsumner scheduling gc when the http response finishes is a clever bun optimization
@jarredsumner Small runtime optimizations like this can make a huge difference at scale.
@jarredsumner You didn't have to do Zig dirty man. Might move to Deno. Away from the drama.
@jarredsumner bro, bun port is hellish, memory leak everywhere, no more again.
@jarredsumner Bun casually finding another free 10%
but basically the runtime knowing what the “unit of work” is, is really good for reducing memory usage. browsers render a frame - that’s a unit of work. http servers send http requests. CLIs…send http requests? Process user input? Write stuff to disk? It’s ambiguous
one of the most impactful memory usage optimizations in bun: schedule gc when the http server finishes sending a response body not clear what the equivalent is for CLIs
anyways, i see a path to a 30% memory reduction for most of bun’s runtime but its not quite shippable yet
maybe http client delivering the last response body chunk but it’s not quite the same since JS may still be executing
http servers respond to http requests*
Positive users praise Bun's clever scheduling of garbage collection after HTTP responses as an efficient optimization, while negative users complain about memory leaks and questionable CLI design.
Based on 7 visible X reactions from 31 accounts; directional sample.
Ask a question below.
Published answers will appear here.
@jarredsumner Bun casually finding another free 10%
but basically the runtime knowing what the “unit of work” is, is really good for reducing memory usage. browsers render a frame - that’s a unit of work. http servers send http requests. CLIs…send http requests? Process user input? Write stuff to disk? It’s ambiguous
one of the most impactful memory usage optimizations in bun: schedule gc when the http server finishes sending a response body not clear what the equivalent is for CLIs
anyways, i see a path to a 30% memory reduction for most of bun’s runtime but its not quite shippable yet
maybe http client delivering the last response body chunk but it’s not quite the same since JS may still be executing