xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #1426: scroll-timing.patch

File scroll-timing.patch, 2.2 KB (added by Antoine Martin, 4 years ago)

add logging for scroll timing within encode_scrolling function

  • xpra/server/window/window_video_source.py

     
    14761476        if 0 not in yscroll_values and 0 in distances:
    14771477            #(but do this last so we don't end up cutting too many rectangles)
    14781478            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)
    14801481        #keep track of the lines we have handled already:
    14811482        #(the same line may be available from multiple scroll directions)
     1483        sstart = time.time()
    14821484        handled = set()
    14831485        scrolls = []
    14841486        max_scrolls = 1000
     
    15071509                        break
    15081510                if len(scrolls)>max_scrolls:
    15091511                    break
     1512        now = time.time()
     1513        scrolllog(" distance matching took %ims", (now-sstart)*1000)
    15101514
     1515        sstart = time.time()
    15111516        non_scroll = []
    15121517        remaining = set(range(h))-handled
    15131518        if remaining:
     
    15261531            self.queue_damage_packet(packet)
    15271532            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",
    15281533                 (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)
    15291536        #send the rest as rectangles:
    15301537        if non_scroll:
    15311538            nsstart = time.time()
     
    15371544            if encoding:
    15381545                encode_fn = self._encoders[encoding]
    15391546                for sy, sh in non_scroll:
     1547                    s = time.time()
    15401548                    sub = image.get_sub_image(0, sy, w, sh)
     1549                    scrolllog("sub_image %i pixels: %.1fms", (w*sh), (time.time()-s)*1000)
    15411550                    flush -= 1
    15421551                    ret = encode_fn(encoding, sub, options)
    15431552                    if not ret: