-
Notifications
You must be signed in to change notification settings - Fork 0
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
478 improve performance of mutation over time #483
478 improve performance of mutation over time #483
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog. Note that this might contain changes that are on main, but not yet released. Changelog: 0.6.19 (2024-11-06)Bug Fixes
Performance Improvements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a couple of minor things.
components/src/preact/mutationsOverTime/mutations-over-time.tsx
Outdated
Show resolved
Hide resolved
components/src/preact/mutationsOverTime/mutations-over-time.tsx
Outdated
Show resolved
Hide resolved
components/src/preact/mutationsOverTime/mutations-over-time.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
components/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts
Show resolved
Hide resolved
a6b4817
to
b0b21c7
Compare
b0b21c7
to
9b1f34d
Compare
resolves #478
Summary
The main change is this PR, is the introduction of web workers for the calculation of the mutations over time. This allows for parallel computation, which is not available otherwise in js.
You can not pass classes with functions to (and from) the web worker. Therefore, I introduced an interface for the temporal and mutation class, which only contains the data of the respective class. The same issue occurred for the
Map2d
class, which now can export/import the underlying data.Testing of a component using the web worker is done through a mock. The mock is enabled using special import directives. This was necessary, since the current mocking approach only allows to mock calls on the same thread.
In this PR also includes
The playwright snapshot tests needed to be updated. The values changed, due to the fix of the overall mutation call and because we call a pango lineage with asterix (JN.1*). Since our last snapshot of the data, there were some other lineages assigned as children of that lineage, which changes the proportion.
Screenshot
PR Checklist