This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
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.
Changes
this is a first step in alleviating the load on
mybinder
. additional investigation is underway to further minimize the load and also find alternative solutions.previously whenever a page loaded, the application would connect to
mybinder
, execute some init code, then wait for user to run the code cells. this results in a lot of connections and code executions inmybinder
given all the times users visit a page and do not try to run any code cells.this PR modifies the behavior and defers the connection to
mybinder
until the user has actually tried to execute one of the code cells. unfortunately, this may mean a longer wait when a user is first executing a code cell but that trade-off is acceptable in the immediate term.related #751
Preview Link
Implementation details
mybinder
and running of init code from theCodeOutput
'smounted()
lifecyclemybinder
and run init code then run the code cellStart kernel and run
if no kernel is detected, else keep asRun
How to read this PR
CodeOutput
ExerciseActionsBar
CodeExercise
andScratchpad
interact with updatedCodeOutput
andExerciseActionsBar
mybinder
is not initialized until you run a code cellScreenshots
Screen.Recording.2023-06-21.at.00.59.21.mov