• Sammie Quon's avatar
    wm: Create alt tab WindowPreviewView only when seen. · 22923754
    Sammie Quon authored
    This will improve fade in performance by delaying the creation of the
    heavy view until needed. It will transfer some delay to the tabbing
    animation but I think the tradeoff is worth it as, for example with
    7 initially offscreen windows:
      1) The performance drop will be split 7 ways (not exactly but rough
      estimate).
      2) Fade in performance is about 3x worse right now and arguably more
      noticeable.
    
    Ran the test below (modified a bit) for 8 and 16 windows, 20 times each
    in a loop. Values are first fade in/average fade in/average container,
    machine is krane. Though would need to check the dashboards for the
    real truth.
    
    Before 8: 6/15/90
    Before 16: 4/5/50
    After 8: 18/61/89
    After 16: 10/58/50
    
    Test: Tast test ui.WindowCyclePerf
    Bug: 1078159
    Change-Id: I2e7252089b7686b109cd5b196ba847eac29e97bd
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2197145
    Commit-Queue: Sammie Quon <sammiequon@chromium.org>
    Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#768907}
    22923754
window_mini_view.h 4.13 KB