How many threads are too many?

Threads are a great thing because they allow us to do several things at once. Then we have the events, which I understand also create threads. Often we want to do many things in certain events that our project is full of SomeObject.SomeEvent:Connect() spread over all the modules or scripts. We also have BindableEvent with which we can create our own events and create objects similar to Instances. But we also have spawn() which allows us to create threads.

There should be some limit to how many threads we can create. Maybe for physical or performance reasons. Both on the server and the client.

2 Likes

I think it depends on how powerfull your computer is.

I mean when the game is in production, that is on the server and the client devices.

Too many doesn’t affect performance, they just take up the players available RAM. But it really depends on what each thread does that affects the performance.

2 Likes

You can check on the performance using some different tools, such as the microprofiler and some other tools.

3 Likes