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

Run mobile push requests in background #3579

Closed

Conversation

quexten
Copy link
Contributor

@quexten quexten commented Jun 13, 2023

Another partial fix for #3577.

Combining this with PR #3578, this should solve #3577.

Mobile push requests are currently run blocking within the HTTP Put for updating a cipher request. In the Bitwarden UI this just shows as if updating the entry takes up to multiple seconds. This request moves the actual HTTP request to the Bitwarden Push servers into a tokio task. This way, sending the notifications does not block the request to update a cipher.

Copy link
Contributor

@GeekCornerGH GeekCornerGH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't thought of it, and didn't figured out, thanks for this catch also

@BlackDex
Copy link
Collaborator

BlackDex commented Jun 13, 2023

Wouldn't it even be better to run those push functions in the background? Now it spawns multiple threads per user, which could become an issue. But if you put this around the function that calls this function it would probably speed up more.

@BlackDex
Copy link
Collaborator

Or, make this push functions allow to receive a vec of multiple values and then loop through those? That will even be better maybe.

@quexten
Copy link
Contributor Author

quexten commented Jun 13, 2023

Closing this PR and combining the changes including both of your suggestions in #3578.

@quexten quexten closed this Jun 13, 2023
@quexten
Copy link
Contributor Author

quexten commented Jun 16, 2023

Okay, not sure why but GitHub seems to have closed my PR on force-push. Reopening with this comment.

@quexten quexten reopened this Jun 16, 2023
@BlackDex
Copy link
Collaborator

I think the reset to main was wrong actually.
But now your branch is out-of-date.

@tessus
Copy link
Contributor

tessus commented Jun 16, 2023

this is the wrong PR

@tessus
Copy link
Contributor

tessus commented Jun 16, 2023

The last 4 days everyone looked at PR #3578

@quexten quexten force-pushed the fix/mobile-push-in-background branch from 8472104 to e460643 Compare June 16, 2023 21:36
@quexten
Copy link
Contributor Author

quexten commented Jun 16, 2023

The last 4 days everyone looked at PR #3578

Whoops.... my bad.

@quexten quexten closed this Jun 16, 2023
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