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
Loading
Please register or sign in to comment