Skip to content

Allow PhysicalShapeLayer raster cache on non-Fuchsia platforms #51515

Closed

Description

@liyuqian

This would improve the performance of ListView with material list items like Card. See #35592 (comment) for an example. Specifically, the shadows of the PhysicalShapeLayer could be costly to rasterize.

This issue would be a sub-issue of #23535

We might need to either

  1. expose a flag to let developers specify whether to raster cache so we won't blow the memory by raster caching all PhysicalShapeLayer.
  2. set a threshold similar to picture raster cache so we only start caching when the same layer gets rasterized multiple times.

Hence, we should not only write performance tests for the speed, but also for memory.

Activity

  1. added
    c: new featureNothing broken; request for a new capability
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    perf: memoryPerformance issues related to memory
    perf: speedPerformance issues related to (mostly rendering) speed
    on Feb 26, 2020
  2. liyuqian commented on Feb 26, 2020

    @liyuqian
    ContributorAuthor

    CC @dnfield @flar who have worked on related issues.

  3. dnfield commented on Feb 26, 2020

    @dnfield
    Contributor

    I am not sure about this anymore, but doesn't Scenic do something special with physical shape layers? Is that compatbile with raster caching on our end?

  4. liyuqian commented on Feb 26, 2020

    @liyuqian
    ContributorAuthor

    Scenic now has a switch to not do something special with the PhysicalShapeLayer. Previously, it doesn't have such a switch and it's always doing something special.

    In case that it's doing something special, Flutter always enables layer raster cache for PhysicalShapeLayer because scenic is going to create a separate surface for PhysicalShapeLayer anyway, so preserving such surface as the raster cache has no extra memory cost.

    If scenic turns on the switch to not do something special, then the raster cache of normal Flutter would kick in (if we're to implement it).

  5. dnfield commented on Feb 26, 2020

    @dnfield
    Contributor

    Ahh cool, thanks. I don't think I know enough about the raster cache beyond that to have a meaningful opinion here - but why would we be concerned about the physical shape layer dominating it?

  6. dnfield commented on Feb 27, 2020

    @dnfield
    Contributor

    Talked offline - it sounds like we should opt for the second option, which is basically how the picture raster cache works, and for which we don't think we have any memory issues currently. My question about dominating was coming from the incorrect idea that we'd somehow be evicting picture layers by doing this.

  7. added
    P2Important issues not at the top of the work list
    on Jun 8, 2020
  8. added
    engineflutter/engine related. See also e: labels.
    on Jul 6, 2020
  9. github-actions commented on Mar 30, 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 Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: fuchsiaengineflutter/engine related. See also e: labels.perf: memoryPerformance issues related to memoryperf: speedPerformance issues related to (mostly rendering) speed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions