feature: configurable max prefetch request count (#2632)

* feature: configurable max prefetch request count

* update name and default value for prefetch number

Co-authored-by: Stefan Silviu <silviu.stefan@atta.systems>
This commit is contained in:
Ștefan Silviu-Alexandru 2022-01-13 15:18:29 +02:00 committed by GitHub
parent d7ba2fac69
commit e4b0552db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,7 @@ export class StudyPrefetcher {
requestType: 'prefetch',
preventCache: false,
prefetchDisplaySetsTimeout: 300,
maxNumPrefetchRequests: 100,
includeActiveDisplaySet: false,
};
@ -151,6 +152,11 @@ export class StudyPrefetcher {
const nonCachedImageIds = this.filterCachedImageIds(imageIds);
const imageLoadPoolManager = cornerstone.imageLoadPoolManager;
imageLoadPoolManager.maxNumRequests = {
...imageLoadPoolManager.maxNumRequests,
prefetch: this.options.maxNumPrefetchRequests,
};
let requestFn;
if (this.options.preventCache) {
requestFn = id => cornerstone.loadImage(id);

View File

@ -11,6 +11,7 @@ window.config = {
displaySetCount: 3,
preventCache: false,
prefetchDisplaySetsTimeout: 300,
maxNumPrefetchRequests: 100,
displayProgress: true,
includeActiveDisplaySet: true,
},