re: Don't Drink Too Much Reactive Cool Aid VIEW POST

re: The cost of thread is hugely eggxagerated. The modern server frameworks have graceful solutions to limit thread number and to use one thread for se...

The cost of thread is hugely eggxagerated.

I admit, I did not do any testing on Desktop VMs recently. But, I was developing a platform for embedded clients running HotSpot VMs. We had around 200kB of memory available (not joking). So we needed to be very carful with any kind of memory usage. We actually removed all Strings in log messages and replaced them by constant numbers. Long story short, I measured the memory consumption of creating a thread (which we needed) and it was around 4kB. I did not dig deep into what it exactly consisted of but at that time it didn't matter.

So, do you have any solid figures for recent Desktop JVMs?


I worked on CORBA framework in the beginning of 2000th and then 1000 threads on server was no issue. All pros for reactivex are artificial. There are a lot of solutions how to reschedule the thread waiting on asychronous call for the other task. The task is made async and called from scheduler. The idea is the same as OS schedules processes and threads on the same CPU.

code of conduct - report abuse