mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

This adds a macrobenchmark representative of a real world application that uses SVG icons. The scenario of rasterizing complex paths that don't change over time does not seem to be covered by any other macrobenchmark and shows a significantly slower impeller performance compared to skia. It's actually bit problematic to measure this because on A15 the CPU load with impeller is high enough to trigger CPU frequency change. So in order to get consistent reading I had to add a spinning background thread that would keep the CPU at highest frequency. ```objc [NSThread detachNewThreadWithBlock:^{ while (true) { pthread_yield_np(); } }]; ``` ```bash flutter drive --profile --local-engine=ios_profile -t test_driver/run_app.dart --driver test_driver/path_tessellation_static_perf_test.dart ``` | average_frame_build_time_millis |Time| |--|--| | Impeller | 0.46686524822695047 | | Skia | 0.4625749999999999 | | Skia - No RasterCache | 0.47173750000000086| | average_frame_rasterizer_time_millis | Time | |--|--| | Impeller | 6.654328519855595 | | Skia - Raster Cache | 0.2534123711340209 * | | Skia - No RasterCache | 0.53424375 | * Adding the `GeometryPainter` seems to have triggered the complexity threshold for raster cache. <img alt="screenshot" width="320" src="https://github.com/flutter/flutter/assets/96958/7a2f9384-b512-477b-bffa-058d4d284a41"/>
62 lines
4.1 KiB
Dart
62 lines
4.1 KiB
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
const String kCullOpacityRouteName = '/cull_opacity';
|
|
const String kCubicBezierRouteName = '/cubic_bezier';
|
|
const String kBackdropFilterRouteName = '/backdrop_filter';
|
|
const String kPostBackdropFilterRouteName = '/post_backdrop_filter';
|
|
const String kSimpleAnimationRouteName = '/simple_animation';
|
|
const String kPictureCacheRouteName = '/picture_cache';
|
|
const String kPictureCacheComplexityScoringRouteName = '/picture_cache_complexity_scoring';
|
|
const String kLargeImageChangerRouteName = '/large_image_changer';
|
|
const String kLargeImagesRouteName = '/large_images';
|
|
const String kPathTessellationRouteName = '/path_tessellation';
|
|
const String kTextRouteName = '/text';
|
|
const String kFullscreenTextRouteName = '/fullscreen_text';
|
|
const String kAnimatedPlaceholderRouteName = '/animated_placeholder';
|
|
const String kClipperCacheRouteName = '/clipper_cache';
|
|
const String kColorFilterAndFadeRouteName = '/color_filter_and_fade';
|
|
const String kColorFilterCacheRouteName = '/color_filter_cache';
|
|
const String kColorFilterWithUnstableChildName = '/color_filter_with_unstable_child';
|
|
const String kFadingChildAnimationRouteName = '/fading_child_animation';
|
|
const String kImageFilteredTransformAnimationRouteName = '/imagefiltered_transform_animation';
|
|
const String kMultiWidgetConstructionRouteName = '/multi_widget_construction';
|
|
const String kHeavyGridViewRouteName = '/heavy_gridview';
|
|
const String kRasterCacheUseMemory = '/raster_cache_use_memory';
|
|
const String kShaderMaskCacheRouteName = '/shader_mask_cache';
|
|
const String kSimpleScrollRouteName = '/simple_scroll';
|
|
const String kStackSizeRouteName = '/stack_size';
|
|
const String kAnimationWithMicrotasksRouteName = '/animation_with_microtasks';
|
|
const String kAnimatedImageRouteName = '/animated_image';
|
|
const String kOpacityPeepholeRouteName = '/opacity_peephole';
|
|
const String kGradientPerfRouteName = '/gradient_perf';
|
|
const String kAnimatedComplexOpacityPerfRouteName = '/animated_complex_opacity';
|
|
const String kAnimatedComplexImageFilteredPerfRouteName = '/animated_complex_image_filtered';
|
|
const String kListTextLayoutRouteName = '/list_text_layout';
|
|
const String kAnimatedBlurBackdropFilter = '/animated_blur_backdrop_filter';
|
|
const String kSlidersRouteName = '/sliders';
|
|
const String kDrawPointsPageRougeName = '/draw_points';
|
|
|
|
const String kOpacityPeepholeOneRectRouteName = '$kOpacityPeepholeRouteName/one_big_rect';
|
|
const String kOpacityPeepholeColumnOfOpacityRouteName = '$kOpacityPeepholeRouteName/column_of_opacity';
|
|
const String kOpacityPeepholeOpacityOfCachedChildRouteName = '$kOpacityPeepholeRouteName/opacity_of_cached_child';
|
|
const String kOpacityPeepholeOpacityOfColumnRouteName = '$kOpacityPeepholeRouteName/opacity_of_column';
|
|
const String kOpacityPeepholeGridOfOpacityRouteName = '$kOpacityPeepholeRouteName/grid_of_opacity';
|
|
const String kOpacityPeepholeOpacityOfGridRouteName = '$kOpacityPeepholeRouteName/opacity_of_grid';
|
|
const String kOpacityPeepholeOpacityOfColOfRowsRouteName = '$kOpacityPeepholeRouteName/opacity_of_col_of_rows';
|
|
const String kOpacityPeepholeFadeTransitionTextRouteName = '$kOpacityPeepholeRouteName/fade_transition_text';
|
|
const String kOpacityPeepholeGridOfRectsWithAlphaRouteName = '$kOpacityPeepholeRouteName/grid_of_rects_with_alpha';
|
|
const String kOpacityPeepholeGridOfAlphaSaveLayerRectsRouteName = '$kOpacityPeepholeRouteName/grid_of_alpha_savelayer_rects';
|
|
const String kOpacityPeepholeColumnOfAlphaSaveLayerRowsOfRectsRouteName = '$kOpacityPeepholeRouteName/column_of_alpha_save_layer_rows_of_rects';
|
|
|
|
const String kGradientPerfRecreateDynamicRouteName = '$kGradientPerfRouteName/recreate_dynamic';
|
|
const String kGradientPerfRecreateConsistentRouteName = '$kGradientPerfRouteName/recreate_consistent';
|
|
const String kGradientPerfStaticConsistentRouteName = '$kGradientPerfRouteName/static_consistent';
|
|
|
|
const String kScrollableName = '/macrobenchmark_listview';
|
|
const String kOpacityScrollableName = '$kOpacityPeepholeRouteName/listview';
|
|
const String kGradientPerfScrollableName = '$kGradientPerfRouteName/listview';
|
|
|
|
const String kStackSizeKey = 'stack_size';
|