[Pythomnic3k-questions] Performance optimization
Brought to you by:
targeted
|
From: Dmitry D. <dm...@ta...> - 2014-08-27 09:01:09
|
Hello all, Talk about premature pessimization :) In a recent commit to pythomnic code I have fixed a plain stupid problem which has been slowing down every single pythomnic application since the beginning of times. The problem was that each time pmnc.module.method is encountered, both the cage directory and the shared directory have been rescanned (listdir-ed), which is a slow filesystem operation. Now I have added several lines of code to have directory contents cached for a few seconds. The speedup is more than 4x. Before an empty http server maxed out at 150-170 requests/sec, now it's 650-700 requests/sec. Please give it a try if you like. Dmitry |