debug-viewer: add more logging and some profiling how-to

The port is much slower than the gtk3 version. Try to figure why.
This commit is contained in:
Stefan Sauer 2016-01-12 09:44:17 +01:00
parent 248d18ee72
commit 016449a53c
3 changed files with 14 additions and 3 deletions

View file

@ -460,7 +460,7 @@ class LogFile (Producer):
self.have_load_started ()
def handle_load_finished (self):
self.logger.debug ("finish loading")
self.lines = LogLines (self.fileobj, self.line_cache)
# Chain up to our consumers:

View file

@ -908,6 +908,7 @@ class Window (object):
_("It is not a GStreamer log file."))
def idle_set ():
self.logger.debug ("idle trigger after load finished")
self.log_view.set_model (self.log_filter)
self.line_view.handle_attach_log_file (self)

View file

@ -21,6 +21,16 @@ NEW: column.pack_start (cell, True)
OLD: view_column.get_cell_renderers ()
NEW: column.get_cells ()
= porting ressources =
# porting ressources #
https://www.xpra.org/trac/ticket/90?cversion=0&cnum_hist=3
https://mail.gnome.org/archives/commits-list/2013-October/msg05205.html
https://mail.gnome.org/archives/commits-list/2013-October/msg05205.html
# profiling #
python -m profile -o output.pstats path/to/your/script arg1 arg2
gprof2dot.py -f pstats output.pstats | dot -Tpng -o output.png
~/projects/tools/gprof2dot/gprof2dot.py -f pstats output.pstats | dot -Tpng -o output.png
eog output.png
python -m cProfile -o output.pstats2 ./gst-debug-viewer debug.noansi.log
~/projects/tools/gprof2dot/gprof2dot.py -f pstats output.pstats2 | dot -Tpng -o output2.png
eog output2.png