Version 1 (modified by 9 years ago) (diff) | ,
---|
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:
So we remove logging from this critical path in r2484, and we now find:
That's a saving of about 35% - not bad for such a small change!
Attachments (2)
-
pycallgraph-draw-loggingremoved.png (62.7 KB) - added by 9 years ago.
much improved after the logging is turned of
-
pycallgraph-draw-loggingisexpensive.png (115.1 KB) - added by 9 years ago.
shows just how expensive logging was in the draw path
Download all attachments as: .zip