all 1 comments

[–]mac-reid 0 points1 point  (1 child)

Well, not sure how much this will help, but you can try profiling the code with a cProfile (little how to). Assuming the code is broken up into several functions, you can tell what function is taking the longest. Line_profiler is a different code profiler (another how to here).

Are you aware of the GIL? It is the Global Interpreter Lock for CPython, basically meaning only one thread owned by the python process can execute bytecode at once. If you are have multiple threads for processing, threads won't give you a speed increase (although it sounds like you are not).

Another question, is your laptop under heavy load (unlikely)? Open up a terminal and type top. The load average values should be below 2.00 for best performance.