Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDK metadata iterator #2035

Merged
merged 3 commits into from
Jun 4, 2024
Merged

NDK metadata iterator #2035

merged 3 commits into from
Jun 4, 2024

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented May 30, 2024

Goal

Reduce the overhead of copying Metadata into the NDK layer. This PR includes some minor fixes to existing tests.

Design

Directly iterate over the Map.entrySet instead of first copying all of the keys to a temporary ArrayList. Since the most common Map implementations maintain their data in Map.Entry objects, this has significantly lower overheads and complexity than the previous pattern.

Testing

Relied on existing tests.

@lemnik lemnik requested review from kstenerud and Cawllec May 30, 2024 10:05
@bugsnagbot
Copy link
Collaborator

bugsnagbot commented May 30, 2024

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1852.08 1675.96
arm64_v8a 631.04 450.82
armeabi_v7a 565.51 385.29
x86 704.75 528.62
x86_64 676.09 495.86

Generated by 🚫 Danger

@Cawllec
Copy link
Contributor

Cawllec commented May 31, 2024

I've rebased and re-tested using the instrumentation tests. They now pass with this change.

@lemnik lemnik force-pushed the PLAT-12075/ndk-metadata-iterator branch from b21630a to af3f5bc Compare June 4, 2024 07:20
@lemnik lemnik merged commit 2cce055 into next Jun 4, 2024
25 checks passed
@lemnik lemnik deleted the PLAT-12075/ndk-metadata-iterator branch June 4, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants