GenSpectrum / dashboard-components

https://genspectrum.github.io/dashboard-components/
GNU Affero General Public License v3.0
2 stars 0 forks source link

478 improve performance of mutation over time #483

Closed JonasKellerer closed 3 weeks ago

JonasKellerer commented 3 weeks ago

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

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2024 8:07am
github-actions[bot] commented 3 weeks ago

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