Skip to content

Fix: flickering when load report#747

Closed
joko3ono wants to merge 5 commits intowurmlab:masterfrom
joko3ono:joko/fix-results-flickering
Closed

Fix: flickering when load report#747
joko3ono wants to merge 5 commits intowurmlab:masterfrom
joko3ono:joko/fix-results-flickering

Conversation

@joko3ono
Copy link
Contributor

@joko3ono joko3ono commented Jun 11, 2024

Context

When I created the histogram, I found that the diagram (circos and histogram) flickered for up to 4 minutes or more, when it flickers, I can't inspect the diagram because it keeps rendering.

Screen.Recording.2024-06-12.at.13.35.31.mov

Solution

In this PR, I separated the diagram and results rendering so that the diagram will only render once.

Screen.Recording.2024-06-12.at.13.39.46.mov

@CLAassistant
Copy link

CLAassistant commented Jun 11, 2024

CLA assistant check
All committers have signed the CLA.

@joko3ono joko3ono requested a review from tadast June 12, 2024 06:40
@joko3ono joko3ono marked this pull request as ready for review June 12, 2024 06:41
@joko3ono joko3ono force-pushed the joko/fix-results-flickering branch 4 times, most recently from c0f512a to af00a3c Compare June 13, 2024 21:00
Copy link
Collaborator

@tadast tadast left a comment

Choose a reason for hiding this comment

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

First of all, I really like that hits got their own component now, makes the code a bit easier to follow, thanks 🙌 Overall it looks good, but to get this over the finish line we need to fix the legitimate spec failures in the suite:

image

Also a couple suggestions in the comments.

Comment on lines +38 to +40
if (this.nextQuery == 0 && this.nextHit == 0 && this.nextHSP == 0) {
this.affixSidebar();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be a responsibility of report.js? I think now with the custom hits batch-rendering logic separated, we should be able to affix the sidebar one in report.js without any of the batch-rendering related checks or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tadast from my perspective it's better this way

in report js, we already have 2 checks

  • if a warning present
  • if results available

Comment on lines +22 to +24
<div className='histogram-container'>
<Histogram query="evalue" name="E-Value Distribution" color={colors[0]} />
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be possible to clean up this PR to only inlcude the performance fix without the Histogram changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can we keep it?

this PR is required to fix performance before we merge histogram.

@joko3ono joko3ono force-pushed the joko/fix-results-flickering branch from de40021 to ef8c828 Compare July 9, 2024 22:30
@tadast tadast mentioned this pull request Jul 22, 2024
@tadast tadast closed this in #772 Jul 22, 2024
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