Skip to content

[1.2.11] - performance drop on this release #19363

@TiBianMod

Description

@TiBianMod

What version of Bun is running?

1.2.10+db2e7d7f7 & 1.2.11+cb6abd211

What platform is your computer?

Darwin 22.6.0 x86_64 i386

What steps can reproduce the bug?

index.ts

const server = Bun.serve({
    port: 3000,
    fetch(request) {
        const key = `${request.method}:${request.url}`;

        return new Response(JSON.stringify({ from: "callback - /" }), {
            headers: {
                "Content-Type": "application/json;charset=utf-8",
            },
        });
    },
});

console.log(`Listening on ${server.url}`);

bench between bun 1.2.10 and 1.2.11

bun index.ts

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

1.2.10 - performance - best of 10 runs

bombardier -c 500 -d 30s http://127.0.0.1:3000
Bombarding http://127.0.0.1:3000 for 30s using 500 connection(s)
[====================================================================================] 30s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec     93793.59    3238.59  106934.85
  Latency        5.33ms   477.11us   105.05ms
  HTTP codes:
    1xx - 0, 2xx - 2811453, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:    18.50MB/s

1.2.11 - performance - best of 10 runs

bombardier -c 500 -d 30s http://127.0.0.1:3000
Bombarding http://127.0.0.1:3000 for 30s using 500 connection(s)
[====================================================================================] 30s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec     88660.15    2548.49  100057.65
  Latency        5.64ms   456.55us   100.35ms
  HTTP codes:
    1xx - 0, 2xx - 2657858, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:    17.49MB/s

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbun:serveBun.serve and HTTP serverperformanceAn issue with performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions