Skip to content

Conversation

AykutSarac
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

It will use web worker for elkjs when available. Also use the existing elkjs instance.

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Uses elkjs web worker.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Copy link

netlify bot commented Apr 7, 2025

Deploy Preview for reaflow ready!

Name Link
🔨 Latest commit 1f2d4e2
🔍 Latest deploy log https://app.netlify.com/sites/reaflow/deploys/67f3ba40fee27c0008f2ddc1
😎 Deploy Preview https://deploy-preview-275--reaflow.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@amcdnl amcdnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the contribution!

For some reason I thought ELK already ran in a webworker.

I noticed you upgraded the npm package, was there any other updates I should mention in the release notes that could be impacted?

@AykutSarac
Copy link
Contributor Author

Appreciate the contribution!

For some reason I thought ELK already ran in a webworker.

I noticed you upgraded the npm package, was there any other updates I should mention in the release notes that could be impacted?

Unfortunately it's not using web workers by default, but this change will help a lot especially working with data so the it won't freeze the main thread.

I did the upgrade on my project as well a while ago, no breaking changes I experienced. I have to note that thought I've only tested this change on the reaflow storybook. Also I added "layered" to algorithms option for the web worker. If the library is using other algorithms it should be updated accordingly.

Copy link
Contributor

@ghsteff ghsteff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@ghsteff ghsteff merged commit 29165b6 into reaviz:master Apr 7, 2025
5 checks passed
AykutSarac added a commit to AykutSarac/jsoncrack.com that referenced this pull request Apr 9, 2025
# use web worker to not block main thread: reaviz/reaflow#275
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.

3 participants