Hacker News new | ask | show | jobs
by realusername 1017 days ago
It's a problem because it slows down my machine and each js file which is added makes the ram and cpu problem worse, it just doesn't scale.

We're using typescript so building only once a day isn't an option.

2 comments

I'm sorry but that doesn't make sense to me (especially your last sentence regarding TypeScript).

During development vite has HMR and you don't need to run build after every change. This is no different when using SSR.

But I don't want to further argue. If you think that SPA is not suitable for your use case, that's ok.

Maybe I don't have the right wording, I'm not sure what it does exactly but running "vite dev" takes 2.5GB of RAM permanently.

It does reload changes very quickly so I guess it has some caching somewhere.

> But I don't want to further argue. If you think that SPA is not suitable for your use case, that's ok.

I personally never seen a use case which did not end up the way I'm describing, my 2 previous companies suffered the same issues.

I even warned my current company that there's a good chance that it would end up the same way and sure enough it did.

> It's a problem because it slows down my machine

I don't know what machine you're using, but filling 2.5GB of RAM was already taking less than 200ms back in 2018.

I don't suspect memory usage is an issue here.

It wouldn't be an issue if other work tools were taking absolutely nothing yes but as it is now, 16GB of RAM with a JS oriented stack isn't enough anymore.

And getting more RAM is just delaying the problem anyways since it takes more RAM every week as the product evolves.