immich icon indicating copy to clipboard operation
immich copied to clipboard

dev(server): fun with bun

Open mertalev opened this issue 11 months ago • 4 comments

Description

This is a test branch to compare performance characteristics.

mertalev avatar Mar 01 '24 17:03 mertalev

Deploying immich with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2123e5c
Status: ✅  Deploy successful!
Preview URL: https://5fb5c07e.immich.pages.dev
Branch Preview URL: https://dev-fun-with-bun.immich.pages.dev

View logs

It was only a matter of time!

etnoy avatar Mar 01 '24 20:03 etnoy

Well, how did the performance testing go?

ttmx avatar Mar 13 '24 15:03 ttmx

It's a healthy uplift in some cases - for one case it took 13ms to do something that took 450-900ms on Node.js. It also finished importing geodata in 18s vs 26s.

In other cases it didn't change much. The CLI didn't benefit from Bun when I tested it. It also has some quirks - it didn't properly close streams in some cases so we had to make some changes there to avoid running out of file descriptors.

This branch was actually mainly because we were debugging a latency increase over time as more thumbnails are downloaded. Bun helped a bit here, but it only stopped that effect for the smaller WebP files and not the larger images.

mertalev avatar Mar 13 '24 17:03 mertalev