summaryrefslogtreecommitdiff
path: root/trace.sh
AgeCommit message (Collapse)Author
2022-10-29Refresh MediaProvider's ATrace events Sergey Nikolaienkov
Add new ATrace events to PickerDataLayer, PickerSyncController and PickerDbFacade. Add prefixes to existing ATrace events on MediaProvider, MediaService, DatabaseUtils, ModernMediaScanner etc. Update trance.sh script to use Perfetto instead of de facto deprecated systrace tool (Perfetto is recommended for devices running Android 10 and higher). Add Perfetto tracing config file perfetto_config.pbtx. Bug: 253186784 Test: m and install MediaProvider APEX Test: ./trace.sh Change-Id: Ib043068378ac3f85bb55a765b57c4eed7e4a8f31
2020-03-08Performance improvements and benchmarks. Jeff Sharkey
Since MediaProvider is in the critical path of Camera and Gallery apps, we need to meet some pretty strict performance thresholds to ensure that we offer a smoother user experience. This change adds performance benchmarks that reflect requests from both internal and external teams, and it averages several runs to ensure that we're able to meet those deadlines. This helped us uncover some regressions where we let some Binder transactions leak back into these critical paths, so we also add tracing to investigate and fix them. In particular, we bring back caching of getVolumePath(), with some new fallback logic to recover if we have a cache miss. When responding to SQLite triggers, the only blocking action should be collecting the relevant Uris for notifyChange() calls; other actions can be deferred to a background thread to keep the critical paths fast. Here's the current measurements on a blueline-eng build; these will be even faster on -userdebug and -user builds: testBulk: actionInsert count=5 duration=431329782 average=86 actionUpdate count=5 duration=252340025 average=50 actionDelete count=5 duration=486200309 average=97 notifInsert count=5 duration=258548358 average=51 notifUpdate count=5 duration=269693308 average=53 notifDelete count=5 duration=352254828 average=70 testSingle: actionInsert count=5 duration=27319587 average=5 actionUpdate count=5 duration=16314063 average=3 actionDelete count=5 duration=22887607 average=4 notifInsert count=5 duration=12765887 average=2 notifUpdate count=5 duration=10215573 average=2 notifDelete count=5 duration=19112397 average=3 Bug: 147778404, 144464323 Test: atest --test-mapping packages/providers/MediaProvider Change-Id: Ib7e2dee94aae0cb9725295df24b03e41ab823fdf