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+% :)
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+% :)