Thanks! After disabling the volume widget, the CPU usage is about 0.7% now.
On Friday, 10 June 2016 11:09:55 UTC+8, dequis wrote: > > 2% is pretty much nothing, profiling something like that is going to get > you noise. That being said, try removing widgets and see if it changes > significantly. The profiler output shows something spawning processes and > the graph widget drawing itself. You can also reduce their update intervals. > > On 9 June 2016 at 23:15, wzhd <[email protected] <javascript:>> wrote: > >> It's not a lot, but the computer is basically idle, and qtile is using >> the most of CPU. >> I found a way to profile qtile with the help of qsh here >> <https://github.com/qtile/qtile/issues/754>: >> >> eval("self.pr = __import__('cProfile').Profile(); self.pr.enable()") >> eval("self.pr.disable(); self.pr.dump_stats('/tmp/qtile_profile')") >> >> >> I sorted the statistics and printed the top 10 functions: >> /tmp/qtile_profile% sort time >> /tmp/qtile_profile% stats 10 >> Fri Jun 10 10:04:12 2016 /tmp/qtile_profile >> >> 824833 function calls (822020 primitive calls) in 168.625 seconds >> >> Ordered by: internal time >> List reduced from 560 to 10 due to restriction <10> >> >> ncalls tottime percall cumtime percall filename:lineno(function) >> 1913 153.676 0.080 153.676 0.080 {method 'poll' of >> 'select.epoll' objects} >> 864 9.322 0.011 9.322 0.011 {method 'read' of >> '_io.BufferedReader' objects} >> 864 1.067 0.001 1.067 0.001 {built-in method >> _posixsubprocess.fork_exec} >> 864 0.948 0.001 0.948 0.001 {built-in method posix.read} >> 864 0.698 0.001 2.907 0.003 >> /usr/lib/python3.5/subprocess.py:1421(_execute_child) >> 311 0.285 0.001 0.287 0.001 {method 'read' of >> '_io.TextIOWrapper' objects} >> 540 0.144 0.000 0.145 0.000 >> /usr/lib/python3.5/site-packages/cairocffi/context.py:1513(stroke_preserve) >> 2910 0.106 0.000 0.106 0.000 >> /usr/lib/python3.5/site-packages/xcffib/__init__.py:617(flush) >> 3069 0.095 0.000 0.101 0.000 {built-in method io.open} >> 540 0.089 0.000 0.447 0.001 >> /usr/lib/python3.5/site-packages/libqtile/widget/graph.py:105(draw_linefill) >> >> Any ideas? >> >> Thanks! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "qtile-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "qtile-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
