Ticket #1426: scroll-timing.patch
File scroll-timing.patch, 2.2 KB (added by , 4 years ago) |
---|
-
xpra/server/window/window_video_source.py
1476 1476 if 0 not in yscroll_values and 0 in distances: 1477 1477 #(but do this last so we don't end up cutting too many rectangles) 1478 1478 yscroll_values.append(0) 1479 scrolllog(" will send scroll packets for yscroll=%s", yscroll_values) 1479 now = time.time() 1480 scrolllog(" will send scroll packets for yscroll=%s, elapsed=%ims", yscroll_values, (now-start)*1000) 1480 1481 #keep track of the lines we have handled already: 1481 1482 #(the same line may be available from multiple scroll directions) 1483 sstart = time.time() 1482 1484 handled = set() 1483 1485 scrolls = [] 1484 1486 max_scrolls = 1000 … … 1507 1509 break 1508 1510 if len(scrolls)>max_scrolls: 1509 1511 break 1512 now = time.time() 1513 scrolllog(" distance matching took %ims", (now-sstart)*1000) 1510 1514 1515 sstart = time.time() 1511 1516 non_scroll = [] 1512 1517 remaining = set(range(h))-handled 1513 1518 if remaining: … … 1526 1531 self.queue_damage_packet(packet) 1527 1532 compresslog("compress: %5.1fms for %4ix%-4i pixels at %4i,%-4i for wid=%-5i using %6s as %3i rectangles (%5iKB) , sequence %5i, client_options=%s", 1528 1533 (end-start)*1000.0, w, h, x, y, self.wid, coding, len(scrolls), w*h*4/1024, self._damage_packet_sequence, client_options) 1534 now = time.time() 1535 scrolllog(" splitting took %ims", (now-sstart)*1000) 1529 1536 #send the rest as rectangles: 1530 1537 if non_scroll: 1531 1538 nsstart = time.time() … … 1537 1544 if encoding: 1538 1545 encode_fn = self._encoders[encoding] 1539 1546 for sy, sh in non_scroll: 1547 s = time.time() 1540 1548 sub = image.get_sub_image(0, sy, w, sh) 1549 scrolllog("sub_image %i pixels: %.1fms", (w*sh), (time.time()-s)*1000) 1541 1550 flush -= 1 1542 1551 ret = encode_fn(encoding, sub, options) 1543 1552 if not ret: