3 ms·
I've recently been knees deep in optimising some old python multi processing code. I threw everything at it from trying to optimise the SQL queries it made to p
by VBprogrammer 6y ago
I've recently been knees deep in optimising some old python multi processing code. I threw everything at it from trying to optimise the SQL queries it made to pre-fetching multiple requests to its child processes. In the end I broke out pyinstrument and found some logging in a loop which was taking up a big chunk of parent time. Fixing that gave a 2x performance increase.
I went back and tested the various changes I'd made to that point and thankfully found that most of them were needed to sustain that performance improvement but it was a good reminder to break out the profiler first, not last.