New twister-core 0.9.13, CPU usage down from 100% to 2%

I know some parts of twister-core might benefit from optimization, but as a follower of Knuth’s optimization mantra i usually try to favor consistency over “premature optimization”.

So it happened that twister started performing very slowly recently. I noticed it and others have noticed it as well. Performance on low-end Android phones was so bad to the point of being unusable.

twisterd went to it’s first profiling session this afternoon. After a few attempts to use kernel perf and oprofile tools, I couldn’t get good call graphs to show me the hot spots (just knowing that CPU is spent inside OpenSSL doesn’t help at all). Finally it was Google’s gperftools that really gave me some useful information.

It turns that an almost one-liner patch is responsible for the most drastic CPU usage reduction in twister ever. Android devices may now run longer on battery. And since this part of the code competes with DHT processing, the quicker response times from other nodes may actually improve the twister’s interactivity as a whole. I’m optimistic. Lets update all the clients and see what happens!

APK and Windows precompiled are already updated to version 0.9.13. Have fun!

Posted in Uncategorized
One comment on “New twister-core 0.9.13, CPU usage down from 100% to 2%
  1. grey says:

    Know anyone who speaks Turkish? Twister would be perfect for the Turkish people.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>