Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e2fc7dde authored by zhenxingwang's avatar zhenxingwang
Browse files

Use another Vector as a swap to reduce computing complexity

When doing cache memory thinning, Vector's removeAt requires momory backward movement.
Its computing complexity is O((N-M)*M) where N is ogg page size, M=512.
For big ogg files, N >> M, it is about O(N*M), which is too high that cause ANR sometimes.

Using another Vector as a swap avoids the movement and reduces
computing complexity from O(N*M) to O(M).

Bug:267463829
Test: atest CtsMediaExtractorTestCases
Test: atest CtsMediaV2TestCases
Change-Id: I00ba80e4c59cc1cf9fa993444e1f9548fb7dd469
parent 21c58e94
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