Experiments with single-page setup to keep Effekt cache #74
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.
The typical workflow of doing the language tour involves reloading the site several times. On every reload, the library/webpack/etc. caches all need to be evaluated from scratch. Running code snippets this way sometimes takes 10-30s per page.
In this PR I hook up the navigation bar links to a function that reloads the main site's content dynamically. This way, the old caches remain since the site isn't reloaded completely. In order to keep the modules working, I have to force some additional refreshes of the modules per page.
The entire implementation is quite hacky right now, probably hides some annoying bugs, and should only serve as a proof of concept. However, for me it works without notable issues and reduced the code execution time after page switching by 99+% :)