Bugzilla – Attachment 1154 Details for
Bug 8204
tl-startup-bg is very slow with high resolutions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Performance profile and diff of modified code.
set_root_background.txt (text/plain), 8.35 KB, created by
Alexander Zeijlon
on 2023-08-15 17:04:18 CEST
(
hide
)
Description:
Performance profile and diff of modified code.
Filename:
MIME Type:
Creator:
Alexander Zeijlon
Created:
2023-08-15 17:04:18 CEST
Size:
8.35 KB
patch
obsolete
>######################################################### >Preparation: >######################################################### >diff --git a/tlmisc/startupbg/tl-startup-bg b/tlmisc/startupbg/tl-startup-bg >index 280a59e99..3d94ccb3e 100755 >--- a/tlmisc/startupbg/tl-startup-bg >+++ b/tlmisc/startupbg/tl-startup-bg >@@ -25,6 +25,7 @@ from thinlinc.Xlib import display, X > from thinlinc.Xlib.ext import randr > from thinlinc.Xlib.error import DisplayConnectionError > from thinlinc.Xlib.protocol import request >+import cProfile > > def print_error(*args): > prefix = "%s: error:" % os.path.basename(sys.argv[0]) >@@ -302,7 +303,9 @@ class StartupBackground (): > > # Set the pixmap as background on the root window > self.root.change_attributes(background_pixmap=pixmap) >+ self.display.flush() > self.root.clear_area() # Redraw >+ self.display.sync() > > def loop(self): > # Set up what events to listen for. We are interested in >@@ -335,7 +338,9 @@ class StartupBackground (): > return > > # Set backgrounds to fit new sizes of each monitor >- self.set_root_background() >+ cProfile.runctx("self.set_root_background()", globals(), locals()) > self.last_resize = time.time() > > def main(): >######################################################### >Measurement: >######################################################### > 91391 function calls (91379 primitive calls) in 12.183 seconds > > Ordered by: standard name > > ncalls tottime percall cumtime percall filename:lineno(function) > 1 0.002 0.002 12.183 12.183 <string>:1(<module>) > 1 0.000 0.000 11.879 11.879 display.py:170(flush) > 1 0.000 0.000 0.010 0.010 display.py:176(sync) > 1 0.000 0.000 11.879 11.879 display.py:252(flush) > 2 0.000 0.000 0.000 0.000 display.py:265(allocate_resource_id) > 4 0.000 0.000 0.000 0.000 display.py:313(get_resource_class) > 1 0.000 0.000 0.000 0.000 display.py:325(get_extension_major) > 1 0.000 0.000 0.000 0.000 display.py:345(check_for_error) > 1086 0.003 0.000 0.003 0.000 display.py:353(send_request) > 3 11.860 3.953 11.889 3.963 display.py:387(send_and_recv) > 4 0.000 0.000 0.000 0.000 display.py:49(__init__) > 15 0.000 0.000 0.000 0.000 display.py:60(__len__) > 6 0.000 0.000 0.000 0.000 display.py:63(__getitem__) > 3 0.000 0.000 0.000 0.000 display.py:677(parse_response) > 2 0.000 0.000 0.000 0.000 display.py:782(parse_request_response) > 2 0.000 0.000 0.000 0.000 display.py:813(parse_event_response) > 1 0.000 0.000 0.010 0.010 display.py:822(get_pointer_control) > 2 0.000 0.000 0.000 0.000 display.py:868(get_waiting_request) > 2 0.000 0.000 0.000 0.000 display.py:922(get_waiting_replyrequest) > 1080 0.003 0.000 0.083 0.000 drawable.py:196(put_image) > 1 0.000 0.000 0.000 0.000 drawable.py:350(change_attributes) > 1 0.000 0.000 0.000 0.000 drawable.py:41(create_pixmap) > 1 0.000 0.000 0.000 0.000 drawable.py:53(create_gc) > 1 0.000 0.000 0.000 0.000 drawable.py:632(clear_area) > 2228 0.000 0.000 0.000 0.000 lock.py:36(__noop) > 2 0.000 0.000 0.000 0.000 lock.py:43(allocate_lock) > 1 0.000 0.000 0.000 0.000 randr.py:1125(get_monitors) > 4 0.000 0.000 0.000 0.000 resource.py:25(__init__) > 1082 0.000 0.000 0.000 0.000 resource.py:30(__resource__) > 1086 0.000 0.000 0.000 0.000 rq.py:1069(<listcomp>) > 6/4 0.000 0.000 0.000 0.000 rq.py:1134(parse_binary) > 35 0.000 0.000 0.000 0.000 rq.py:1290(__getattr__) > 2 0.000 0.000 0.000 0.000 rq.py:1300(__init__) > 1084 0.003 0.000 0.081 0.000 rq.py:1344(__init__) > 2 0.000 0.000 0.011 0.005 rq.py:1357(__init__) > 2 0.000 0.000 0.011 0.005 rq.py:1370(reply) > 2 0.000 0.000 0.000 0.000 rq.py:1390(_parse_response) > 2 0.000 0.000 0.000 0.000 rq.py:1406(__init__) > 1086 0.000 0.000 0.000 0.000 rq.py:203(calc_length) > 2168 0.001 0.000 0.002 0.000 rq.py:297(check_value) > 2 0.000 0.000 0.000 0.000 rq.py:303(parse_value) > 2 0.000 0.000 0.000 0.000 rq.py:352(check_value) > 1080 0.000 0.000 0.000 0.000 rq.py:363(check_value) > 1080 0.003 0.000 0.003 0.000 rq.py:395(pack_value) > 3/1 0.000 0.000 0.000 0.000 rq.py:501(parse_binary_value) > 2 0.000 0.000 0.000 0.000 rq.py:741(pack_value) > 1086 0.054 0.000 0.074 0.000 rq.py:982(to_binary) > 1086 0.004 0.000 0.005 0.000 rq.py:993(<listcomp>) > 1 0.000 0.000 0.110 0.110 tl-startup-bg:111(set_image) > 1 0.049 0.049 0.049 0.049 tl-startup-bg:138(get_pixels) > 1 0.028 0.028 0.162 0.162 tl-startup-bg:183(put_image_surface) > 1 0.000 0.000 0.000 0.000 tl-startup-bg:235(get_total_monitor_size) > 1 0.004 0.004 12.181 12.181 tl-startup-bg:282(set_root_background) > 1 0.000 0.000 0.015 0.015 tl-startup-bg:81(set_solid_color) > 2 0.000 0.000 0.000 0.000 tl-startup-bg:93(scale_pattern) > 2 0.000 0.000 0.000 0.000 {built-in method _struct.calcsize} > 1089 0.001 0.000 0.001 0.000 {built-in method _struct.pack} > 12 0.000 0.000 0.000 0.000 {built-in method _struct.unpack} > 1 0.000 0.000 12.183 12.183 {built-in method builtins.exec} > 1082 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} > 2172 0.000 0.000 0.000 0.000 {built-in method builtins.hasattr} > 48828 0.005 0.000 0.005 0.000 {built-in method builtins.isinstance} >4368/4360 0.001 0.000 0.001 0.000 {built-in method builtins.len} > 1083 0.000 0.000 0.000 0.000 {built-in method builtins.max} > 1080 0.001 0.000 0.001 0.000 {built-in method builtins.min} > 5 0.010 0.002 0.010 0.002 {built-in method select.select} > 12999 0.001 0.000 0.001 0.000 {method 'append' of 'list' objects} > 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} > 3 0.125 0.042 0.125 0.042 {method 'fill' of 'cairo.Context' objects} > 12 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects} > 1 0.000 0.000 0.000 0.000 {method 'get_data' of 'cairo.ImageSurface' objects} > 2 0.000 0.000 0.000 0.000 {method 'get_height' of 'cairo.ImageSurface' objects} > 2 0.000 0.000 0.000 0.000 {method 'get_source' of 'cairo.Context' objects} > 1 0.000 0.000 0.000 0.000 {method 'get_stride' of 'cairo.ImageSurface' objects} > 4 0.000 0.000 0.000 0.000 {method 'get_width' of 'cairo.ImageSurface' objects} > 1086 0.001 0.000 0.001 0.000 {method 'intersection' of 'set' objects} > 1086 0.002 0.000 0.002 0.000 {method 'join' of 'bytes' objects} > 3 0.000 0.000 0.000 0.000 {method 'rectangle' of 'cairo.Context' objects} > 3 0.000 0.000 0.000 0.000 {method 'recv' of '_socket.socket' objects} > 3 0.000 0.000 0.000 0.000 {method 'restore' of 'cairo.Context' objects} > 3 0.000 0.000 0.000 0.000 {method 'save' of 'cairo.Context' objects} > 3 0.019 0.006 0.019 0.006 {method 'send' of '_socket.socket' objects} > 2 0.000 0.000 0.000 0.000 {method 'set_matrix' of 'cairo.Pattern' objects} > 2 0.000 0.000 0.000 0.000 {method 'set_source' of 'cairo.Context' objects} > 1 0.000 0.000 0.000 0.000 {method 'set_source_rgba' of 'cairo.Context' objects} > 1 0.000 0.000 0.000 0.000 {method 'set_source_surface' of 'cairo.Context' objects} > 2 0.000 0.000 0.000 0.000 {method 'translate' of 'cairo.Context' objects} > 1086 0.000 0.000 0.000 0.000 {method 'update' of 'dict' objects}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8204
: 1154