4 ms·
If you need that much performance out of Python, it's probably time to switch to Go. With Python, you still have the Global Interpreter Lock, even in PyPy. Mu
by Animats 12y ago
If you need that much performance out of Python, it's probably time to switch to Go. With Python, you still have the Global Interpreter Lock, even in PyPy. Multiple CPUs, which you probably have available, don't help.
- temuze 12y agoThis isn't an option when you have a large legacy code base in Python and you aren't the size of Dropbox.
- zik 12y agoIf you're trying to convert a large legacy code base to async I/O you're up for a huge amount of work anyway.
- threeseed 12y agoSure. But you aren't likely to be changing core business logic. And believe me the cost of retraining, recoding and retesting all of your code is going to be significantly more expensive than buying better hardware.
- fiatjaf 12y agoModularize and migrate parts of your app, slowly.
- bayesianhorse 12y agoThe global interpreter lock does not apply to multiple processes. Web applications are embarrassingly parallel.
- Animats 12y agoMultiple processes in Python at scale mean really clunky interprocess communication, lots of copies of everything the interpreter loaded, and lots of cache misses.
- bayesianhorse 12y agoGood thing the stateless nature of web requests means database persistence is all the interprocess communication needed.
- jsmeaton 12y agoMultiple CPUs don't help for a single request, but the majority of deployments use processes (and threads within the processes) to run multiple requests in parallel. You can definitely saturate all the CPUs with a single Django application, provided the application server is running multiple processes.