Skip to content
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

Load visualisations in web worker #1180

Open
3 of 7 tasks
rolyp opened this issue Nov 16, 2024 · 1 comment
Open
3 of 7 tasks

Load visualisations in web worker #1180

rolyp opened this issue Nov 16, 2024 · 1 comment
Assignees

Comments

@rolyp
Copy link
Collaborator

rolyp commented Nov 16, 2024

Should solve the “unresponsive page” problem. Web workers are specifically designed for this sort of issue. The main difficulty will be that fluid.js contains a fair bit of DOM-manipulating code (mainly using d3.js to make new elements and insert them into the page), but web workers don’t have direct access to the DOM.

  • Initial experiment: put importScripts('fluid.js') into a worker and run from index.html
  • Separate creation of chart element from insertion into DOM
    • Return (id $\mapsto$ fig) map from PureScript main?
    • Break dependency on d3-selection (and other d3 modules that use DOM)?
  • import { loadFig } from ('./output/App/Fig/index.js') idiom to run PureScript functions directly?
    • Drop runAffs helper for processing arrays of Aff, in favour of runAff'
    • drawFig’, drawFile’ specialisations of runAff'

See also:

@rolyp rolyp added this to Fluid Nov 16, 2024
@github-project-automation github-project-automation bot moved this to Proposed in Fluid Nov 16, 2024
@rolyp rolyp moved this from Proposed to Planned in Fluid Nov 16, 2024
@rolyp
Copy link
Collaborator Author

rolyp commented Nov 16, 2024

@RaoOfPhysics FYI

@rolyp rolyp self-assigned this Nov 25, 2024
@rolyp rolyp moved this from Planned to In Progress in Fluid Nov 25, 2024
@rolyp rolyp moved this from In Progress to Paused in Fluid Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Paused
Development

No branches or pull requests

1 participant