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

[v4] Improve performance of watch #117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chan150
Copy link

@chan150 chan150 commented Jan 8, 2025

When using isar v4, streaming performance of watch is extremely degraded since it needs to create stream controller.
To solve this issue, we utilize both watchLazy and findAll instead of allocating stream controller.

@chan150 chan150 changed the title Improve performance of watch [v4] Improve performance of watch Jan 8, 2025
@vicenterusso
Copy link
Member

Hello @chan150,

I'm interested in understanding the performance degradation. Could you come up with a small reproduction?

@chan150
Copy link
Author

chan150 commented Jan 8, 2025

Here is a small reproduction:
https://github.com/chan150/isar_performance_degration_reproduction_example

2025-01-09.071016.mp4

@chan150
Copy link
Author

chan150 commented Jan 9, 2025

Screen Refresh Rate Benchmark:

flutter: Improved watch (ms.): 29
flutter: Original watch (ms.): 1809
flutter: Improved watch (ms.): 14
flutter: Original watch (ms.): 2446
flutter: Improved watch (ms.): 13
flutter: Original watch (ms.): 2695
flutter: Improved watch (ms.): 16
flutter: Original watch (ms.): 2063
flutter: Improved watch (ms.): 12
flutter: Original watch (ms.): 2027
flutter: Improved watch (ms.): 8
flutter: Original watch (ms.): 2573
flutter: Improved watch (ms.): 8
flutter: Original watch (ms.): 2520
flutter: Improved watch (ms.): 9
flutter: Original watch (ms.): 1904
flutter: Improved watch (ms.): 11
flutter: Original watch (ms.): 2024
flutter: Improved watch (ms.): 9
flutter: Original watch (ms.): 2007
flutter: Improved watch (ms.): 11
flutter: Original watch (ms.): 2476

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.

2 participants