Skip to content
Commit 13a5b557 authored by haoyu.wang's avatar haoyu.wang Committed by Hongwei Wang
Browse files

Reduce the memory usage of the ProtoLogToFile

The protolog in wm/am is generally less than 1kb after being writtem to ProtoOutputStream,
but 'new ProtoOutputStream()' will at least create a byte array of 8kb each time.
This will cause each log to occupy at least 7kb of useless memory.
When the log cached by 'ProtoLogToFile' reaches BUFFER_CAPACITY(1MB), it will occupy 70MB of memory.
This has a greater impact on some low-memory devices.

Bug: 271179026
Bug: 262244460
Merged-In: I368278df6f801b2b2b67974089d4a7f4147d91cc
Change-Id: I368278df6f801b2b2b67974089d4a7f4147d91cc
parent 09262ed0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment