First, profile your code with cProfile:
$ python3 -m cProfile -o profile_output search.py
But output of that is not very helpful. To make sense of the cProfiler's output install CProfileV:
# install cprofilev
$ pip3 install cprofilev
First, profile your code with cProfile:
$ python3 -m cProfile -o profile_output search.py
But output of that is not very helpful. To make sense of the cProfiler's output install CProfileV:
# install cprofilev
$ pip3 install cprofilev