summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkParsing.cpp
diff options
context:
space:
mode:
author Piyush Mehrotra <piee@google.com> 2023-01-24 18:10:19 +0000
committer Piyush Mehrotra <piee@google.com> 2023-01-25 14:07:07 +0000
commitf859b257dc35342a95dea4d15d9ab2c7c887e188 (patch)
tree00533c3f5581dc0a9bb9530e5729ac4b1dd2c312 /libs/androidfw/ApkParsing.cpp
parent796c571acc4c422f8f080d7bfce3cf43085774c8 (diff)
Control buffer size via server flags when writing to pipes in Full Backup flow.
Reasoning behind making buffer size configurable - - In PerformFullTransportBackupTask (PFTBT) -> * PFTBT calls Transport#sendBackupData() everytime it writes buffer to the write end of the pipe (which is then read by the transport). That method is invoked through binder, which introduces some overhead. Current buffer size of 8KB means that for 25MB of backup data, PFTBT does a minimum of 3200 binder calls. Increasing the buffer size to 64KB, the number of binder call reduces to 400. - In FullBackupUtils -> * FullBackupUtils#routeSocketDataToOutput() routes the data from BackupAgent to FullBackupEngine. Linux pipe2 implementation of Android has default size of 64KB. Increasing the buffer size in FullBackupUtils from 32KB to 64KB will result in optimal performance for piping the data, as buffer size will match input pipe's buffer. Bug: b/265976737 Test: atest BackupAndRestoreFeatureFlagsTest - Manual testing for the performance impact Change-Id: I729e0a5857e254eb9451eecf6fd9e58ac0511eb8
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions