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

Reduce memory reallocation in FirebasePushNotificationSender #9

Open
bierquelle06 opened this issue Aug 22, 2023 · 0 comments
Open

Comments

@bierquelle06
Copy link
Member

....\src\AdsPush.Firebase\FirebasePushNotificationSender.cs

Object Instantiation within Loops:
In the SendBatchNotificationAsync method, you are creating multiple instances of FirebaseNotificationResult within a loop, using the CreateUsingFirebaseSendResponse method.

Recommendation: If you expect to have a large number of notifications and responses, consider using a more efficient data structure like a List with preallocated capacity. This can help reduce memory reallocation overhead during list growth.

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

No branches or pull requests

1 participant