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

StackPrefetchTool no longer support maxSimultaneousRequests #1428

Open
3 tasks done
Betalos opened this issue Sep 15, 2021 · 4 comments
Open
3 tasks done

StackPrefetchTool no longer support maxSimultaneousRequests #1428

Betalos opened this issue Sep 15, 2021 · 4 comments

Comments

@Betalos
Copy link

Betalos commented Sep 15, 2021

Prerequisites

  • Which version are you using? 4.0.0 (Is it latest?) YES
  • Are you reporting to the correct repository?
  • Did you search existing issues? (Were any related?) No

Description

The 3.x.x version used to have a prop for maxSimultanousRequests when configuring StackPrefetchTool.
The new version has moved to requestPoolManager (imageLoadPoolManager) provided by cornerstone-core for such functionality but it's not there.

Expected behavior: Allow the possibility to specify the maxSimultaneousRequests.

Actual behavior: All the the image are loaded in the same time instead of chunking them

@swederik
Copy link
Member

Hi @Betalos,

We are a bit behind on our documentation here but intend to clarify things ASAP. The maximum simultaneous requests option has been removed because with HTTP2, it's no longer a major issue to have 6 or fewer requests open. It also felt a bit redundant to have that option, plus the per-type (interactive, prefetch, ...) options.

With the latest set of Cornerstone Core / WADO Image Loader libraries, the loading step is essentially three queues:

A queue for Image Loading (default is 1000 simultaneous loads, you can change it here https://github.com/cornerstonejs/cornerstone/blob/master/src/requestPool/imageLoadPoolManager.ts#L6). Inside each image load is

The idea is that if number of cores or CPU speed is your bottleneck, you can retrieve as many files as possible while waiting for decoding operations to take place. This might also be an issue with larger images.

An issue that we noticed was that with the old system, the requestPoolManager queue was at the image load (i.e. retrieval + decode) level, which meant that while images were decoding, we were wasting valuable time that could have been used to transfer additional images in parallel.

Hope that helps!

@Betalos
Copy link
Author

Betalos commented Sep 15, 2021

Hi @swederik,

Thanks for the quick replay. Well for my particular use case the bottle neck is the backend (if I send chunks of request the loading of large series - 600+ instances - is better).

What I have noticed that link is not used properly or not working as intended since here they would be loaded at the same time (XHR request triggered)

@swederik
Copy link
Member

Oh good catch, that is very true it is not being used properly! I'll fix that (https://github.com/cornerstonejs/cornerstoneTools/blob/master/src/stackTools/stackPrefetch.js#L234).

Thanks!

@Betalos
Copy link
Author

Betalos commented Sep 15, 2021

Your welcome, glade I can help.

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

No branches or pull requests

2 participants