Virtual Threads Ate My Memory: A Web Crawler’s Tale of Speed vs. Memory
Photo by Julian Hochgesang on UnsplashI built a simple web crawler using good old platform threads. It was just a multithreaded crawler, nothing fancy. But then, curiosity struck: “What happens if I use Virtual Threads instead?”Virtual Threads are one of my favorite recent additions to the Java ecosystem. Switching from platform threads to Virtual Threads dramatically improved the URL processing rate… until the whole thing blew up with an OutOfMemoryError.Yep. Fast became too fast.I love explori...
Read more at dariobalinzo.medium.com