xpra icon
Bug tracker and wiki

Profiling Examples


maths.py re-written in Cython

Merged in r2462


  • Before:
    $ XPRA_CYTHON_MATH=0 ./tests/xpra/test_maths.py 
    calculate_time_weighted_average(100000 records)=(0.5129547191923681, 0.529864013016996)
    elapsed time: 72.6ms
    test_calculate_timesize_weighted_average(100000 records)=(70109.42497899215, 22337.16293859974)
    elapsed time: 204.9ms
    
  • After:
    $ XPRA_CYTHON_MATH=1 ./tests/xpra/test_maths.py 
    calculate_time_weighted_average(100000 records)=(0.5226684212684631, 0.5245391130447388)
    elapsed time: 4.0ms
    test_calculate_timesize_weighted_average(100000 records)=(180154.15625, 35980.69140625)
    elapsed time: 19.7ms
    

Which is 10 to 20 times faster.

high network cost in UI thread

Work in progress, see #231

Fixing an expensive logging call (in a hotpath)

This is a recurring problem, see: r2294, r2290, etc

By running the server with:

xpra start :10 --start-child=glxgears

And the client with:

./tests/scripts/pycallgraph -t draw -i '*' -r 20 -- attach :10 --no-mmap

We find that logging is really costing us dearly:
shows just how expensive logging was in the draw path
So we remove logging from this critical path in r2484, and we now find:
much improved after the logging is turned of
That's a saving of about 35% - not bad for such a small change!

Last modified 3 years ago Last modified on 12/11/13 10:28:31

Attachments (2)

Download all attachments as: .zip