-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Implement ability to reuse session for initial render #3679
Merged
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
Codecov Report
@@ Coverage Diff @@
## main #3679 +/- ##
==========================================
+ Coverage 83.17% 83.20% +0.03%
==========================================
Files 263 264 +1
Lines 37234 37350 +116
==========================================
+ Hits 30968 31076 +108
- Misses 6266 6274 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
951237d
to
77b5297
Compare
maximlt
reviewed
Aug 23, 2022
maximlt
reviewed
Aug 23, 2022
maximlt
reviewed
Aug 23, 2022
maximlt
reviewed
Aug 23, 2022
maximlt
reviewed
Aug 23, 2022
91b8de2
to
579de17
Compare
49a470e
to
a907b2c
Compare
e1f3efa
to
796f765
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 is an experiment to see if we can improve the speed of handling the initial request. The basic idea behind this is that in most cases the initial page served to the user is identical, i.e. the template does not differ between sessions. As long as that holds true we can simply cache the first session for each endpoint and reuse that to render the template served to the user. In the background we can then still create a session for each user which the rendered template connects to.
The way this works is that we simply modify the
token
which tells the frontend which session it should connect to. So the steps are:DocHandler
uses a cached session to render the templatesession_id
in the token so that the frontend does not re-connect to the existing sessionThis will significantly reduce time to first render but also comes with some caveats and drawbacks: