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

[Impeller] preallocate command buffer to next power of two of entity list. #48185

Merged
merged 4 commits into from
Nov 21, 2023

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Nov 17, 2023

Commands are massive 500 byte objects, re-allocating this vector while recording them can actually add a substantial amount of overhead to applications with lots of drawing commands. Sizing to npot so that underestimating by a few commands doesn't force us to immediately copy all command objects.

This is still a herustic driven approach. An alternative exact approach would have entities/contents describe how many commands they would add. This may be more important for stencil then cover (depending on how we do it) since some contents would need to create two commands.

@jonahwilliams jonahwilliams marked this pull request as ready for review November 20, 2023 21:22
@jonahwilliams jonahwilliams changed the title Size commands npot [Impeller] preallocate command buffer to next power of two of entity list. Nov 20, 2023
@jonahwilliams
Copy link
Member Author

Ping @matanlurey

Copy link
Contributor

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 21, 2023
@auto-submit auto-submit bot merged commit 0c2de1e into flutter:main Nov 21, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 21, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 21, 2023
…138834)

flutter/engine@746697c...0c2de1e

2023-11-21 [email protected] [Impeller] preallocate command buffer to next power of two of entity list. (flutter/engine#48185)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
caseycrogers pushed a commit to caseycrogers/flutter that referenced this pull request Dec 29, 2023
…lutter#138834)

flutter/engine@746697c...0c2de1e

2023-11-21 [email protected] [Impeller] preallocate command buffer to next power of two of entity list. (flutter/engine#48185)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants