Skip to content

Experiments with single-page setup to keep Effekt cache#74

Draft
marvinborner wants to merge 8 commits intomainfrom
feature/single-page-poc
Draft

Experiments with single-page setup to keep Effekt cache#74
marvinborner wants to merge 8 commits intomainfrom
feature/single-page-poc

Conversation

@marvinborner
Copy link
Member

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

@marvinborner marvinborner force-pushed the feature/single-page-poc branch from c32c0c6 to fde304f Compare September 27, 2024 22:52
@marvinborner marvinborner force-pushed the feature/single-page-poc branch from 5d18208 to 1095e84 Compare September 28, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant