summaryrefslogtreecommitdiff
path: root/trace.sh
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@android.com> 2020-03-05 17:09:39 -0700
committer Jeff Sharkey <jsharkey@android.com> 2020-03-08 19:53:38 -0600
commit229886406cd24d71985b32ebbfcc6581802b61ca (patch)
tree7ab8fc4f25d2f480ff6d9bd86d814259f4898eea /trace.sh
parentd5a429288176f8e49489070dc9ca9d433de5e9d0 (diff)
Performance improvements and benchmarks.
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
Diffstat (limited to 'trace.sh')
-rwxr-xr-xtrace.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/trace.sh b/trace.sh
new file mode 100755
index 000000000..410e8f073
--- /dev/null
+++ b/trace.sh
@@ -0,0 +1 @@
+./external/chromium-trace/systrace.py -b 128768 -a com.google.android.providers.media.module,com.android.providers.media.module binder_driver