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

Performance/create session with content #2225

Merged
merged 2 commits into from
Mar 9, 2022

Conversation

max-nextcloud
Copy link
Collaborator

Summary

Fetch the content of the file when creating the session. Saves the fetch request whenever no initialSession is given. On my dev instance this saves 80ms - but it's hard to tell how much it will save in production. Well it will save one roundtrip that is currently blocking the rendering of the content.

@juliusknorr juliusknorr added this to the Nextcloud 24 milestone Mar 7, 2022
@max-nextcloud max-nextcloud force-pushed the performance/create-session-with-content branch from a24eefe to 632ac30 Compare March 8, 2022 08:02
@max-nextcloud max-nextcloud force-pushed the performance/create-session-with-content branch from 632ac30 to 858d947 Compare March 8, 2022 12:39
Simplify the session creation code a bit:
* handle the two ways of initializing a sesson only in SyncService.
* use async instead of .then(...)
* handle errors in helper function.

Signed-off-by: Max <max@nextcloud.com>
@juliusknorr juliusknorr force-pushed the performance/create-session-with-content branch from 858d947 to 1661fa3 Compare March 8, 2022 21:59
Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

Nice, thanks for looking into that 👍

@max-nextcloud
Copy link
Collaborator Author

/compile amend /

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nextcloud-command nextcloud-command force-pushed the performance/create-session-with-content branch from 1661fa3 to fd63951 Compare March 9, 2022 05:23
@max-nextcloud max-nextcloud merged commit f4f5e44 into master Mar 9, 2022
@delete-merged-branch delete-merged-branch bot deleted the performance/create-session-with-content branch March 9, 2022 05:37
@juliusknorr juliusknorr mentioned this pull request Mar 10, 2022
39 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Embed initial file fetching into the create session endpoint
2 participants