Skip to content

Check that breakpoint split view is ready before fetching to avoid crash/large data fetching #5037

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

Merged
merged 4 commits into from
May 22, 2025

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented May 19, 2025

Background - prehistory

The breakpoint split view, for better or worse, fetches features independently of the tracks

This is because the tracks don't have full info about the features that they contain, because this is slow due to serialization of data over webworker

Background - this issue

The breakpoint split view calls CoreGetFeatures independently of the tracks. However, it doesn't check if it is appropriate to call getFeatures (e.g. if it is looking at too large an area)

This can cause it to trigger very large data downloads accidentally in some cases, and this came up when re-navigating breakpoint split views

This fix

This PR fixes it by checking for the track.displays[0] being not not ready. This may not be a complete solution even in itself yet, because it only checks the flag on the first instance of the track e.g. not both levels of the breakpoint split view

Fixes #5026

Random background

We use the term notReady instead of ready because if a track sets the ready flag to undefined, that does not necessarily mean it is not ready even though that is falsy...we try to look for genuine signals from tracks who define the concept of them being not ready but looking for notReady true, which avoids having to reason about ready:undefined being not ready or not

@cmdcolin cmdcolin merged commit fa19053 into main May 22, 2025
4 checks passed
@cmdcolin cmdcolin deleted the fix_bsv_ready branch May 22, 2025 18:18
@cmdcolin cmdcolin added the bug Something isn't working label May 22, 2025
@cmdcolin cmdcolin changed the title Check that the subtracks of breakpoint split view are ready before fetching Check that the subtracks of breakpoint split view are ready before fetching to avoid crash/large data fetching May 22, 2025
@cmdcolin cmdcolin changed the title Check that the subtracks of breakpoint split view are ready before fetching to avoid crash/large data fetching Check that breakpoint split view is ready before fetching to avoid crash/large data fetching May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breakpoint split view can occasionally miss showing read connections
1 participant