bun icon indicating copy to clipboard operation
bun copied to clipboard

Why is bun so slow

Open TechGunners opened this issue 10 months ago • 5 comments

What version of Bun is running?

1.1.2+c8d072c2a

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

Don't know

What is the expected behavior?

Install in milliseconds start the SvelteKit application in milliseconds

What do you see instead?

image

It took 65 seconds to install

Untitled

It took 11 seconds to start my SvelteKit application

TechGunners avatar Apr 06 '24 07:04 TechGunners

Hi, if it was the first time using bun install, it makes sense for it to take time. That's because it won't have any global cache to copy the packages from. On the first time, it will install packages as well as copy them to a cache and use that cache the next time you try to install any of those packages. Try copying the package.json and bun.lockb to another dir. and install there.

m1abdullahh avatar Apr 06 '24 11:04 m1abdullahh

No, it wasn't the first time Installing those pkg's but it was first time Installing some of the newer versions, but it still shouldn't take that much time but when I deleted the node_modules folder to run bun i again, it took around 22 sec, which is still a lot compere to what you guys claim in your website and what about the slow startup time?

TechGunners avatar Apr 06 '24 13:04 TechGunners

Same to me on my Win11 pc, 165s to download the first time, 95s the others, npm takes 33s with cache. On my Mac it's speedy af

blk-raffy avatar Apr 06 '24 13:04 blk-raffy

No, it wasn't the first time Installing those pkg's but it was first time Installing some of the newer versions, but it still shouldn't take that much time but when I deleted the node_modules folder to run bun i again, it took around 22 sec, which is still a lot compere to what you guys claim in your website and what about the slow startup time?

Can you attach the package file?

m1abdullahh avatar Apr 06 '24 14:04 m1abdullahh

@m1abdullahh Here's the full repo link and heres the package file package.json

TechGunners avatar Apr 07 '24 02:04 TechGunners