Skip to content
Commit 4f44cf75 authored by haoyu.wang's avatar haoyu.wang Committed by 浩宇王
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
Change-Id: I368278df6f801b2b2b67974089d4a7f4147d91cc
parent 18493d62
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