Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: flutter/engine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 752b146
Choose a base ref
...
head repository: flutter/engine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f4c20e9
Choose a head ref
  • 2 commits
  • 18 files changed
  • 1 contributor

Commits on Apr 28, 2024

  1. [Impeller] when creating new pipeline variant block on current thread…

    …, re-persist dirty pipeline cache. (#52375)
    
    Current diagram of how PSO variants are created (after first bootstrap)
    
    ```
    Raster thread.                             Worker Thread
    1.  Check Pipeline Cache
    2. Pipeline Cache Empty
    3. Create Promise
    4. Spawn Worker                     ->      Compile Pipeline
    5. Block On Future.                       ..                                                    
    6.
    7. Resolve                          <-      Complete Future
    ```
    
    This is a serialized workload due to blocking on future completion. But performing it on two threads means that we're also adding in the somewhat random cost of thread scheduling and or getting deprioritized.
    
    Instead when creating variants, block on the current thread. Now if we knew all the variants we need to create for a frame ahead of time, we could spawn one or more works to creat them more quickly. This would require more work though.
    
    While I'm at it. Update the pipeline cache to persist every 50 frames, if it has added a new shader.
    
    part of flutter/flutter#129660
    Jonah Williams authored Apr 28, 2024
    Configuration menu
    Copy the full SHA
    dbeec53 View commit details
    Browse the repository at this point in the history
  2. [Impeller] remove image upload from IO thread, limit concurrent worke…

    …r threads. (#52423)
    
    Fixes flutter/flutter#123058
    Fixes flutter/flutter#135443
    
    We're currently using the IO thread to bottleneck image uploads. Instead, just use fewer concurrent worker threads - and cap the limit at something small. For a Pixel device, this should use about 2 threads maximum, instead of  5 (4 worker and 1 IO).
    Jonah Williams authored Apr 28, 2024
    Configuration menu
    Copy the full SHA
    f4c20e9 View commit details
    Browse the repository at this point in the history
Loading