Skip to content

Add benchmark for ShaderMask RasterCache#100127

Merged
fluttergithubbot merged 13 commits intoflutter:masterfrom
wangying3426:fix_shader_mask_cache
Mar 28, 2022
Merged

Add benchmark for ShaderMask RasterCache#100127
fluttergithubbot merged 13 commits intoflutter:masterfrom
wangying3426:fix_shader_mask_cache

Conversation

@wangying3426
Copy link
Contributor

@wangying3426 wangying3426 commented Mar 15, 2022

Benchmark for flutter/engine#32027
A set of test data on Redmi Note 3 in profile mode is:

  1. Benchmark A/B Test
═════════════════════════╡ ••• Final A/B results ••• ╞══════════════════════════

Score	Average A (noise)	Average B (noise)	Speed-up
average_frame_build_time_millis	2.25 (0.00%)	2.20 (0.00%)	1.02x	
worst_frame_build_time_millis	4.23 (0.00%)	3.93 (0.00%)	1.08x	
90th_percentile_frame_build_time_millis	3.02 (0.00%)	2.95 (0.00%)	1.02x	
99th_percentile_frame_build_time_millis	4.05 (0.00%)	3.15 (0.00%)	1.29x	
average_frame_rasterizer_time_millis	6.83 (0.00%)	3.22 (0.00%)	2.12x	
worst_frame_rasterizer_time_millis	8.63 (0.00%)	5.22 (0.00%)	1.65x	
90th_percentile_frame_rasterizer_time_millis	7.94 (0.00%)	3.72 (0.00%)	2.13x	
99th_percentile_frame_rasterizer_time_millis	8.38 (0.00%)	4.46 (0.00%)	1.88x	
average_layer_cache_count	0.00 (0.00%)	2.00 (0.00%)	0.00x	
90th_percentile_layer_cache_count	0.00 (0.00%)	2.00 (0.00%)	0.00x	
99th_percentile_layer_cache_count	0.00 (0.00%)	2.00 (0.00%)	0.00x	
worst_layer_cache_count	0.00 (0.00%)	2.00 (0.00%)	0.00x	
average_layer_cache_memory	0.00 (0.00%)	3.68 (0.00%)	0.00x	
90th_percentile_layer_cache_memory	0.00 (0.00%)	3.68 (0.00%)	0.00x	
99th_percentile_layer_cache_memory	0.00 (0.00%)	3.68 (0.00%)	0.00x	
worst_layer_cache_memory	0.00 (0.00%)	3.68 (0.00%)	0.00x	
average_picture_cache_count	2.00 (0.00%)	0.00 (0.00%)	Infinityx	
90th_percentile_picture_cache_count	2.00 (0.00%)	0.00 (0.00%)	Infinityx	
99th_percentile_picture_cache_count	2.00 (0.00%)	0.00 (0.00%)	Infinityx	
worst_picture_cache_count	2.00 (0.00%)	0.00 (0.00%)	Infinityx	
average_picture_cache_memory	3.67 (0.00%)	0.00 (0.00%)	Infinityx	
90th_percentile_picture_cache_memory	3.67 (0.00%)	0.00 (0.00%)	Infinityx	
99th_percentile_picture_cache_memory	3.67 (0.00%)	0.00 (0.00%)	Infinityx	
worst_picture_cache_memory	3.67 (0.00%)	0.00 (0.00%)	Infinityx	
new_gen_gc_count	0.00 (0.00%)	0.00 (0.00%)	NaNx	
old_gen_gc_count	0.00 (0.00%)	0.00 (0.00%)	NaNx
  1. Memory
  • NotCached

Screen Shot 2022-03-15 at 10 56 46 PM

  • Cached

Screen Shot 2022-03-15 at 10 52 20 PM

Associated with #99542

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Mar 15, 2022
@wangying3426 wangying3426 marked this pull request as draft March 15, 2022 11:45
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@wangying3426 wangying3426 marked this pull request as ready for review March 15, 2022 15:59
@eggfly eggfly requested a review from flar March 21, 2022 04:05
Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

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

LGTM

Running on my Moto G4 the layout follows the same pattern as the other cache perf benchmark.

@flar
Copy link
Contributor

flar commented Mar 22, 2022

It looks like the PR needs to be rebased to solve some merge conflicts and you also seem to have an issue with the order of the imports in main.dart?

@wangying3426
Copy link
Contributor Author

wangying3426 commented Mar 23, 2022

It looks like the PR needs to be rebased to solve some merge conflicts and you also seem to have an issue with the order of the imports in main.dart?

@flar Yes, I have resolved the conflicts. Could you please review this PR flutter/engine#32027 at the same time?

Similar to ImageFilterLayer and ColorFilterLayer, the A/B test shows that average_frame_rasterizer_time_millis and 90th_percentile_frame_rasterizer_time_millis are significantly reduced when raster cache is used.

@wangying3426 wangying3426 force-pushed the fix_shader_mask_cache branch 2 times, most recently from 20aa644 to 491bab8 Compare March 25, 2022 06:22
@wangying3426 wangying3426 force-pushed the fix_shader_mask_cache branch from 491bab8 to a65eca1 Compare March 25, 2022 11:21
@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • This commit is not mergeable and has conflicts. Please rebase your PR and fix all the conflicts.

@fluttergithubbot fluttergithubbot merged commit 712abb0 into flutter:master Mar 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants