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

optimize linegraph category comparison #1668

Merged
merged 4 commits into from
Sep 9, 2022
Merged

Conversation

jchorl
Copy link
Contributor

@jchorl jchorl commented Apr 15, 2022

Optimizes the category comparison of the linegraph.

See the issue is, d["data"] does not change while looping through d["data"] as best I can tell. So every iteration, the result will be the same. The only thing we need to check is that the values are lists. Once we verify that, we just need to check categories once per dataset.

In one case, I was comparing a list of 68000 cats, 68000 times. This is an n^2 problem, no bueno.

The fix brought multiqc from not on a dataset to finishing in ~20s.

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md has been updated

I didn't think this was worthy of CHANGELOG, lmk if you feel otherwise

@ewels
Copy link
Member

ewels commented May 9, 2022

Nice! 👏🏻

Sounds like it's worth celebrating so therefore worth a changelog entry 🍾🥳

@jchorl
Copy link
Contributor Author

jchorl commented Jun 5, 2022

Updated changelog!

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

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

Oops, sorry for delaying this by 6 months and missing a release due to requesting a one-line changelog entry 🙄

Awesome stuff as always, thank you! 👏🏻 🙏🏻

@ewels ewels merged commit 6dd961f into MultiQC:master Sep 9, 2022
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.

2 participants