4 ms·
I am still not comfortable enough with this concept to answer this question myself, but will this, by default, lead to speed ups and/or reduced resource consump
by Traubenfuchs 6y ago
I am still not comfortable enough with this concept to answer this question myself, but will this, by default, lead to speed ups and/or reduced resource consumption in a) application server like tomcat and b) web frameworks like Spring? Assuming it's implemented...
- amitport 6y agoProbably no, but that's not the point. These server frameworks have complex code that helps balance load across threads. Loom may make such programs simpler to write, but will not automatically give a boost to already optimized code.
- aardvark179 6y agoIt depends a lot on how the service handles requests. If it takes the one thread per request model, and those requests are mostly bound by blocking calls like IO, then replacing those OS level threads with virtual threads will almost certainly see a reduction in resources (as virtual threads are smaller) and potentially more consistent response times (because scheduling the correct thread is easier at the JVM level). However if your service has been written in an async style, or you are mostly CPU bound, then you aren't likely to see a change. Our hope is that by making simple blocking code perform better you won't have to spend your time converting code to an async style to scale your services.