refactor: Optimize success count calculation in BatchResponse by mingi3314 · Pull Request #837 · firebase/firebase-admin-python
Discussion
This PR refactors the BatchResponse class to optimize the calculation of success_count. The original implementation used a list comprehension to filter successful responses, which could be inefficient for large datasets. This has been replaced with a generator expression, which improves memory efficiency and maintains clarity.
No public API changes have been made. This change only affects the internal logic of the BatchResponse class.
Testing
- Verified that all existing tests in the repository pass successfully after the change.
- As this is a refactor with no change to external behavior, no additional tests were required.
API Changes
This change does not affect the public API. It only optimizes internal logic for better performance and readability.