My Kivy application is suffering from a noticeable response lag to touch events, on my test machine:
- Deb Jessie, Python 2.7, Kivy 1.9.1
- Intel Atom 1860 Mhz
- Geforce GT610 4GB RAM SSD
- 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
It runs fine on my iMac, and whilst the Mac is obviously a lot more powerful, I don't believe my deb machine should be struggling. Yet, Python is sitting at around 85% CPU when the app is ticking over, and any touch events cause that to fly up to around 235%.
Now, I'm going to take a wild guess that my code is to blame, but can anyone suggest a howto or process to go through to start finding out what / which parts of the code are responsible? I have 3 threads running (apart from Kivy), which seem to look ok, but ideally I guess I'm looking for a 'top' command in Python as a start ;)
EDIT ok, so I've now run the script through cProfile, which seems to suggest that this is the top user of cpu:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 11.158 11.158 <string>:1(<module>)
To quote the brilliant Ultravox, 'This means nothing to me'...