Investigate start-up of standalone apps |
|||||
Issue descriptionThe keyboard-shortcut-viewer (and to some degree the tap_visualizer) seem to take quite a bit of time to startup. We need to get real metrics on how long these take on real devices, and understand where the time is going. At at minimum this fixing this bug will mean adding an UMA metric for startup of ksv (and the metric should be easy to extend to other apps). If in adding this metric we determine startup is indeed too long, then this bug should change into areas that are slow.
,
May 30 2018
,
May 30 2018
+msw FYI
,
May 30 2018
To study the start-up time for keyboard-shortcut-viewer, we might need to separate the time of startup of the window itself and the time to init and layout the KeyboardShortcutItemListView [1] for all the Side tabs/categories. The layout of KeyboardShortcutItemListView is more time consuming because we dynamically calculate/generate labels in the StyledLabel, which probably is not an generic issue for other apps. [1] https://cs.chromium.org/chromium/src/ash/components/shortcut_viewer/views/keyboard_shortcut_view.cc?l=301&rcl=577ba3637231998f5f807afce564d7f417e7c2aa
,
Jun 4 2018
wutao, do you have a separate bug open for KSV init/layout performance? I'd like to use this bug for general mojo app startup performance, and track the layout stuff separately. I also wonder if we could speed things up by only laying out the first tab, then posting a task to do the layout for the tabs that aren't visible. I don't know if we do that or not. I guess it depends on where the time goes (like, if the time is due to font loading/rendering then layout won't matter as much).
,
Jun 4 2018
jamescook@, we do not have separate bug open for KSV init/layout performance. I tested to comment out lines 261 to 275 and the line 282 [1], the mus app version of KSH can start very quick. This indicates that the layout might be the major issue. We did not do as you mentioned, only laying out the first tab and run other tab in the background, which could significantly speed up. There are two bugs related to the layout performance. The first one has been fixed to reduce the search latency and enhance the search experience. The second bug, has more performance requirement, we do not have Milestone target because KSH is not resizable by design. 1. Fixed. bug 818882: Reduce the latency in search mode of Keyboard Shortcut Viewer 2. The layout performance is the key concern, but debounce might work it around to avoid repeatedly layout: bug 822377: Layout needs to support resizing and maximizes [1] https://cs.chromium.org/chromium/src/ash/components/shortcut_viewer/views/keyboard_shortcut_view.cc?rcl=577ba3637231998f5f807afce564d7f417e7c2aa&l=261
,
Jun 4 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d9b2272021c2954e304df95a1bc803454d08fb6d commit d9b2272021c2954e304df95a1bc803454d08fb6d Author: James Cook <jamescook@chromium.org> Date: Mon Jun 04 21:13:59 2018 Don't use font service with aura mus This improves keyboard shortcut viewer app startup time by 150 ms on veyron_minnie (32-bit ARM). Background: The font service allows loading fonts from arbitrary paths (needed on Linux) for sandboxing. However, it isn't necessary for mus apps, since they launch as utility processes and can use fonts directly. We can revisit this if we need tighter sandboxing for mus apps. Bug: 847613 Change-Id: I6e570d8e5483ed004cd815000d85f8ead5310b8c Reviewed-on: https://chromium-review.googlesource.com/1085631 Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: James Cook <jamescook@chromium.org> Cr-Commit-Position: refs/heads/master@{#564240} [modify] https://crrev.com/d9b2272021c2954e304df95a1bc803454d08fb6d/ui/views/mus/BUILD.gn [modify] https://crrev.com/d9b2272021c2954e304df95a1bc803454d08fb6d/ui/views/mus/DEPS [modify] https://crrev.com/d9b2272021c2954e304df95a1bc803454d08fb6d/ui/views/mus/aura_init.cc [modify] https://crrev.com/d9b2272021c2954e304df95a1bc803454d08fb6d/ui/views/mus/aura_init.h
,
Jun 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bb024f15dc64220cf50dc7ceb362ce273697fc12 commit bb024f15dc64220cf50dc7ceb362ce273697fc12 Author: James Cook <jamescook@chromium.org> Date: Wed Jun 06 17:42:07 2018 chromeos: Add UMA metrics for keyboard shortcut viewer startup time This will measure the time from Ctrl-Shift-/ keystroke to dialog show. This CL works with the non-mojo-app shortcut viewer we're using today. When we switch to the app version we'll need to pass the keystroke time over mojo to the app, perhaps via a Toggle() method. Adding the mojo Toggle() interface is tracked in crbug.com/847615 Metric is Keyboard.ShortcutViewer.StartupTime Bug: 847615 , 847613 Test: added to ash_unittests, manually checked chrome://histograms Change-Id: I425f44d0b71543f225d73857365d050be0e1b446 Reviewed-on: https://chromium-review.googlesource.com/1087779 Commit-Queue: James Cook <jamescook@chromium.org> Reviewed-by: Ilya Sherman <isherman@chromium.org> Reviewed-by: Tao Wu <wutao@chromium.org> Cr-Commit-Position: refs/heads/master@{#564952} [modify] https://crrev.com/bb024f15dc64220cf50dc7ceb362ce273697fc12/ash/components/shortcut_viewer/BUILD.gn [modify] https://crrev.com/bb024f15dc64220cf50dc7ceb362ce273697fc12/ash/components/shortcut_viewer/shortcut_viewer_application.cc [modify] https://crrev.com/bb024f15dc64220cf50dc7ceb362ce273697fc12/ash/components/shortcut_viewer/shortcut_viewer_application.h [modify] https://crrev.com/bb024f15dc64220cf50dc7ceb362ce273697fc12/ash/components/shortcut_viewer/views/keyboard_shortcut_view.cc [modify] https://crrev.com/bb024f15dc64220cf50dc7ceb362ce273697fc12/ash/components/shortcut_viewer/views/keyboard_shortcut_view.h [modify] https://crrev.com/bb024f15dc64220cf50dc7ceb362ce273697fc12/ash/components/shortcut_viewer/views/keyboard_shortcut_view_unittest.cc [modify] https://crrev.com/bb024f15dc64220cf50dc7ceb362ce273697fc12/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_util.cc [modify] https://crrev.com/bb024f15dc64220cf50dc7ceb362ce273697fc12/tools/metrics/histograms/histograms.xml
,
Jun 6 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by wutao@chromium.org
, May 29 2018