Skip to content

fix: skip batch mode for HTTP /load to allow parallel track loading - #1850

Open
bsgarciac wants to merge 2 commits into
igvteam:mainfrom
bsgarciac:fix/http-load-parallel-tracks
Open

fix: skip batch mode for HTTP /load to allow parallel track loading#1850
bsgarciac wants to merge 2 commits into
igvteam:mainfrom
bsgarciac:fix/http-load-parallel-tracks

Conversation

@bsgarciac

@bsgarciac bsgarciac commented Jul 29, 2026

Copy link
Copy Markdown

Summary

Fixes the sequential track loading issue reported in #1849.

When loading multiple tracks via the HTTP command listener (/load), loadFiles was unconditionally calling Globals.setBatch(true), which forced synchronous/sequential loading. This is necessary for port/batch script commands (where the next command is unknown), but not for HTTP requests where all files are known upfront.

Changes:

  • Added boolean forceBatch parameter to loadFiles in CommandExecutor
  • Port/batch script path passes forceBatch=true (no behavior change)
  • HTTP /load path passes forceBatch=false, allowing IGV to load tracks without forcing batch mode

Impact

  • HTTP /load: tracks can now load in parallel instead of sequentially
  • Port/batch scripts: no change, batch mode still enforced
  • Sort after load: unaffected, sort is applied after loadTracks returns regardless of batch mode

Test case

Loading 11 remote BAM files via HTTP /load previously took ~4.5 minutes (11 × ~25 sec sequential). With this change, loading time should drop significantly as tracks load in parallel.

Closes #1849

Port/batch script commands still force batch mode for synchronization.
HTTP /load requests pass forceBatch=false so tracks can load in parallel
instead of sequentially. Relates to igvteam#1849.
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.

Parallel track loading when triggered via HTTP command listener

1 participant