Skip to content

[Impeller] Investigate remaining Flutter gallery performance issues on Vulkan/GLES. #132690

Closed

Description

@jonahwilliams

There are three kinds of slow frames I can see from looking at the devicelab benchmarks:

(Vulkan) Blocking on FenceWaiter::AddFence

image

(Vulkan/GLES) slow atlas population

image

(Vulkan) Slow command encoding

image

Activity

  1. moved this to 🤔 Needs Triage in Impelleron Aug 16, 2023
  2. jonahwilliams commented on Aug 18, 2023

    @jonahwilliams
    ContributorAuthor

    The slow render pass encoding reproduces on a Pixel 7 as well. Here is a highly annotated trace:

    image

    In this case, GARBO2 is a trace event I added in the command pool recycler:

    void CommandPoolVK::GarbageCollectBuffersIfAble() {
        TRACE_EVENT0("impeller", "CommandPoolVK::GARBO2");
      if (std::this_thread::get_id() != owner_id_) {
        return;
      }
      buffers_to_collect_.clear();
    }
    
    

    So I suspect the issue may be destroying command pools is stalling on the raster thread. We should re-arrange this code to use the resource manager if possible.

  3. gaaclarke commented on Aug 19, 2023

    @gaaclarke
    Member

    We noted this offline too, but just creating and deleting CommandPoolVK and command buffers may be faster than the synchronization that was added to try to cache them. Also it seems like maybe CommandPoolVK is built on the assumption that the command buffers need to be deleted on the raster thread which shouldn't be the case. Since the tracked objects is trying to delete it on the resource tracker thread, we should be able to delete them safely there.

  4. added
    P1High-priority issues at the top of the work list
    on Aug 21, 2023
  5. moved this from 🤔 Needs Triage to ⚙️ In Progress in Impelleron Aug 22, 2023
  6. changed the title [-][Impeller] investigate remaining Flutter gallery performance issues on Vulkan/Gles.[/-] [+][Impeller] Investigate remaining Flutter gallery performance issues on Vulkan/GLES.[/+] on Aug 22, 2023
  7. jonahwilliams commented on Sep 25, 2023

    @jonahwilliams
    ContributorAuthor

    Closing as a duplicate of #135443

  8. moved this from ⚙️ In Progress to ✅ Done in Impelleron Sep 25, 2023
  9. github-actions commented on Oct 9, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work liste: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions