-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Optimize NetService related performances #1267
Open
Ldoppea
wants to merge
2
commits into
feat/delay_nonimportant_calls
Choose a base branch
from
feat/improve_netservice
base: feat/delay_nonimportant_calls
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+15
β4
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ldoppea
changed the base branch from
master
to
feat/delay_nonimportant_calls
December 19, 2024 17:30
2 tasks
zatteo
approved these changes
Dec 20, 2024
Ldoppea
force-pushed
the
feat/delay_nonimportant_calls
branch
from
December 20, 2024 14:24
8968982
to
7b1a62f
Compare
Ldoppea
force-pushed
the
feat/improve_netservice
branch
from
December 20, 2024 14:25
000a188
to
5b4bd63
Compare
Ldoppea
force-pushed
the
feat/delay_nonimportant_calls
branch
from
December 20, 2024 14:30
7b1a62f
to
9ca8720
Compare
Ldoppea
force-pushed
the
feat/improve_netservice
branch
from
December 20, 2024 14:30
5b4bd63
to
f04e814
Compare
Ldoppea
force-pushed
the
feat/delay_nonimportant_calls
branch
from
December 20, 2024 16:43
9ca8720
to
bace560
Compare
Ldoppea
force-pushed
the
feat/improve_netservice
branch
from
December 20, 2024 16:43
f04e814
to
f64f70c
Compare
Ldoppea
force-pushed
the
feat/delay_nonimportant_calls
branch
from
December 20, 2024 17:32
bace560
to
eb60cf2
Compare
Ldoppea
force-pushed
the
feat/improve_netservice
branch
from
December 20, 2024 17:32
f64f70c
to
5c8b9fb
Compare
Ldoppea
force-pushed
the
feat/delay_nonimportant_calls
branch
from
December 20, 2024 19:37
eb60cf2
to
5ae845f
Compare
Ldoppea
force-pushed
the
feat/improve_netservice
branch
from
December 20, 2024 19:37
5c8b9fb
to
06803ec
Compare
Ldoppea
force-pushed
the
feat/delay_nonimportant_calls
branch
from
December 20, 2024 19:55
5ae845f
to
1cba83b
Compare
Ldoppea
force-pushed
the
feat/improve_netservice
branch
from
December 20, 2024 19:55
06803ec
to
16d9827
Compare
Ldoppea
force-pushed
the
feat/delay_nonimportant_calls
branch
from
December 20, 2024 20:09
1cba83b
to
9173b36
Compare
Ldoppea
force-pushed
the
feat/improve_netservice
branch
from
December 20, 2024 20:09
16d9827
to
efa5e6b
Compare
With previous implementation, NetService would be configured too late and so it would have time to do reachability test on google servers before we configure it with Cozy's servers This commit move the configuration outside of the React components and so we ensure it is called as soon as possible
With previous implementation, NetService would do reachability tests too often and sometimes multiple times in parallel (as we can call `isOnline` from multiple parallel `client.query()` calls) This is problematic as it can unnecessary slow down the app processes This commit caches the isOnline result and register to the `NetInfo` event listener so stay up-to-date, so we can drastically reduce reachability tests on Cozy's servers
Ldoppea
force-pushed
the
feat/delay_nonimportant_calls
branch
from
December 20, 2024 20:20
9173b36
to
67b3e0e
Compare
Ldoppea
force-pushed
the
feat/improve_netservice
branch
from
December 20, 2024 20:20
efa5e6b
to
39ddcc4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR add caching for the
isOnline()
method and also change the way NetService is initialized to prevent unwanted calls to google's servers