Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Reuse android java String instances in TextBlock #10428

Merged
merged 4 commits into from
Nov 17, 2022

Conversation

jeromelaban
Copy link
Member

GitHub Issue (If applicable): #8597

PR Type

What kind of change does this PR introduce?

  • Refactoring (no functional changes, no api changes)

What is the new behavior?

  • Reuse Java.String instances for fast-path TextBlock rendering
  • Fix ApiInformation initialization sequence for android
  • Fix MemoryManager values update for android and ArrayPool automatic memory management for android

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@gitpod-io
Copy link

gitpod-io bot commented Nov 14, 2022

@github-actions github-actions bot added the platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform label Nov 14, 2022
@nventive-devops
Copy link
Contributor

The build 61864 found UI Test snapshots differences: android-28-xamarin: 0, android-28-xamarin-Snap: 0, ios: 41, ios-Snap: 107, macOS-screenshots: 31, skia-gtk-screenshots: 14, skia-wpf-screenshots: 12, wasm: 29, wasm-automated-net7.0-Benchmarks: 0, wasm-automated-net7.0-Default: 4, wasm-automated-net7.0-RuntimeTests: 0

Details
  • android-28-xamarin: 0 changed over 0

  • android-28-xamarin-Snap: 0 changed over 0

  • ios: 41 changed over 291

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ComboBoxTests_ToggleDisabled_ComboBox_Enabled
    • ComboBoxTests_ToggleDisabled_UITests_Windows_UI_Xaml_Controls_ComboBox_ComboBox_ToggleDisabled
    • Keyboard_Textbox_NoScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Collapsed_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Expanded_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Initial_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item_Large
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_Collapsed_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_Expanded_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_Initial_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item_Large
    • ListView_ExpandableItemLarge_ExpandHeader_Validation_Collapsed_State
    • ListView_ExpandableItemLarge_ExpandHeader_Validation_Expanded_State
    • ListView_ExpandableItemLarge_ExpandHeader_Validation_Initial_State
    • PasswordBox_RevealInScrollViewer_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll
    • BasicExpressionTest_UITests_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBox_ExpressionTest
    • ComboBoxTests_ToggleDisabled_ComboBox_Disabled
    • Keyboard_Textbox_NoScrollViewer_Validation_0_-_Remove_Focus_on_normalTextBox
  • ios-Snap: 107 changed over 1005

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_UITests_Windows_UI_Xaml_Media_BrushesTests_SolidColorBrush_Color_Changed_UITests_Windows_UI_Xaml_Media_BrushesTests_SolidColorBrush_Color_Changed
    • Brushes_UITests_Windows_UI_Xaml_Media_GradientBrushTests_LinearGradientBrush_Change_Stops_UITests_Windows_UI_Xaml_Media_GradientBrushTests_LinearGradientBrush_Change_Stops
    • Buttons_AppBarButtonTest_Uno_UI_Samples_Content_UITests_ButtonTestsControl_AppBarButtonTest
    • Buttons_AppBarToggleButtonTest_Uno_UI_Samples_Content_UITests_ButtonTestsControl_AppBarToggleButtonTest
    • Border_Border_Simple_with_Opacity_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_with_Opacity
    • Border_NonUniformThicknessandRadius_Uno_UI_Samples_UITests_BorderTestsControl_NonUniformThicknessandRadius
    • Buttons_Simple_TextBlockButton_Uno_UI_Samples_Content_UITests_TextBlockControl_Simple_TextBlockButton
    • Buttons_ToggleSwitch_IsEnable_Automated_Uno_UI_Samples_Content_UITests_ButtonTestsControl_ToggleSwitch_IsEnable_Automated
    • Buttons_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsBasicPage_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsBasicPage
    • Buttons_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsFocusPage_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsFocusPage
    • ContentControl_ContentControl_FindName_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_FindName
    • ContentControl_ContentControl_MultiLevelInheritance_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_MultiLevelInheritance
    • Date_Picking_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_IsSelected
    • Default_UITests_Shared_Windows_UI_Xaml_Controls_Popup_Popup_Overlay_On_UITests_Shared_Windows_UI_Xaml_Controls_Popup_Popup_Overlay_On
    • Default_UITests_Toolkit_ElevatedView_CornerRadius_UITests_Toolkit_ElevatedView_CornerRadius
    • Default_UITests_Toolkit_ElevatedView_Dimensions_UITests_Toolkit_ElevatedView_Dimensions
    • Default_UITests_Toolkit_ElevatedView_Tester_UITests_Toolkit_ElevatedView_Tester
    • ContentControl_ContentControl_SetNull_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_SetNull
    • ContentControl_ContentControl_WithPadding_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_WithPadding
  • macOS-screenshots: 31 changed over 1083

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Image-Image_Stretch_Alignment_Bigger.png
    • Image-Image_Stretch_Alignment_Taller.png
    • Image-Image_Stretch_Alignment_Wider.png
    • Image-Image_Stretch_None_ScrollViewer.png
    • Image-ImageSourceUrlMsAppDataScheme.png
    • Image-Image_Fixed_Size_Alignment.png
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • NavigationView-NavigationViewTopNavPage.png
    • ListView-ListView_IsSelected.png
    • MediaPlayerElement-Using .3gp.png
    • MediaPlayerElement-Using .flv.png
    • MediaPlayerElement-Using .mov.png
    • MediaPlayerElement-Using .ogg.png
    • MUX-NavigationViewBasicPage.png
    • MUX-NavigationViewCompactPaneLengthTestPage.png
    • MUX-NavigationViewCustomThemeResourcesPage.png
    • MUX-NavigationViewItemTemplatePage.png
    • MUX-NavigationViewPage.png
    • MUX-NavigationViewRS3Page.png
  • skia-gtk-screenshots: 14 changed over 1072

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes-Ellipse.png
    • DragAndDrop-DragDrop_TestPage.png
    • Image-Image_Formats.png
    • Image-UniformToFill100x100.png
    • MUX-NavigationViewRS4Page.png
    • MUX-NavigationViewPage.png
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • MUX-TabViewPage.png
    • Progress-WindowsProgressRing_GH1220.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
    • TabView-TabViewPage.png
  • skia-wpf-screenshots: 12 changed over 1072

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Automation-AutomationProperties_Name.png
    • DragAndDrop-DragDrop_TestPage.png
    • MUX-NavigationViewRS4Page.png
    • MUX-NavigationViewPage.png
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • Progress-WindowsProgressRing_GH1220.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
    • TabView-TabViewPage.png
    • Transform-TransformToVisual_Translate2d.png
  • wasm: 29 changed over 1013

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MUXControlsTestApp.NavigationViewMenuItemStretchPage
    • MUXControlsTestApp.NavigationViewMinimalPage
    • MUXControlsTestApp.NavigationViewTopNavPage
    • MUXControlsTestApp.PersonPicturePage
    • MUXControlsTestApp.PipsPagerExamples
    • SamplesApp.Samples.Windows_UI_Xaml_Controls.NavigationViewTests.NavigationView_BasicNavigation
    • SamplesApp.Samples.Windows_UI_Xaml_Controls.NavigationViewTests.NavigationView_Pane_Automated
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewChangeView
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewContainerFromItem
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewVariableHeightComplexTemplate
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Expandable_Item_Large
    • SamplesApp.Windows_UI_Xaml_Shapes.StretchPage
    • UITests.Microsoft_UI_Xaml_Controls.ImageIconTests.ImageIconPage
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRingPage
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRing_Features
    • UITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewPage
    • UITests.Shared.Windows_UI_Xaml.ViusalStateTests.VisualState_AdaptiveTrigger_Storyboard
    • UITests.Shared.Windows_UI_Xaml_Automation.AutomationProperties_Name
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_Explicit_Items
  • wasm-automated-net7.0-Benchmarks: 0 changed over 1

  • wasm-automated-net7.0-Default: 4 changed over 887

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ScrollBar_Vertical_initial_indicators
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • Validate_Offscreen_Shapes_UITests_Windows_UI_Xaml_Shapes_Offscreen_Shapes
  • wasm-automated-net7.0-RuntimeTests: 0 changed over 1

@jeromelaban jeromelaban marked this pull request as ready for review November 16, 2022 16:35
@jeromelaban
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jeromelaban jeromelaban merged commit c5fb1eb into master Nov 17, 2022
@jeromelaban jeromelaban deleted the dev/jela/android-perf-textblock-string-reuse branch November 17, 2022 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants