[Fix]Performance issue on iOS due to MetalView scale calculation #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔗 Issue Links
Resolves https://linear.app/stream/issue/IOS-1215/investigationorbuginvestigate-memory-usage-degradation-after-webrtc
📝 Summary
We observed increased memory usage when switched from m125.4 to m137.4. This revision addresses and resolves the issue causing the increased usage.
🛠 Implementation
The issue was caused due to commit
1d5d3b80ec10f9102ac55a2a020248159bb48557which was attempting to scale the rendered drawables in the metalView by taking under consideration the screen's scaleFactor. That was causing additional computation that ended up increasing the memory usage.As this change was unexpected (our m125 fork from LiveKit was cut before this commit was introduced) this revision reverts this change.
An item has been added in the iOS backlog to investigate if this a change that we want to bring forward and evaluate the pros and cons of it.
🧪 UI Testing Notes
CallFlow_PerformanceTests.test_performance_with4Participantsto ensure that it passes.☑️ Contributor Checklist