2 ms·
> 100ms/page (i.e. just 10 requests/second) If a page takes 100ms, that doesn't mean you only have 10 requests/second. With a little care you can have thousand
by bad_user 17y ago
> 100ms/page (i.e. just 10 requests/second)
If a page takes 100ms, that doesn't mean you only have 10 requests/second. With a little care you can have thousands of requests per second, especially on top the JVM.
> A single 45Kb SVG file, when fully parsed, eats up 150MB right here on my laptop.
That's not the fault of the JVM, although I do agree that many Java-libraries are memory-hogs.
The only difference between the JVM and CLR/Python/Perl/Ruby is that the JVM doesn't return the used memory to the OS. This means that if the JVM reaches 1 GB of used memory, it will remain there even if the GC kicks. Also, when allocating memory, the JVM has to allocate more memory than it needs because it needs space to degragment the heap. But on the other hand compared to CPython / Ruby MRI / Perl ... the JVM's GC is generational and heap-compacting, making it much more efficient memory-wise for long-running processes ... allocation is cheaper, deallocation is smarter and you won't end-up with a heap that looks like swiss cheese.