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-AlexandruandStefan Silviu authored and GitHub committed 2022-01-13 08:18:29 -05:00
1 parent d7ba2fac69
commit e4b0552db4
2 files changed
+7

No files matched your search

@@ -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);
+1
View File
@@ -11,6 +11,7 @@ window.config = {
displaySetCount: 3,
preventCache: false,
prefetchDisplaySetsTimeout: 300,
maxNumPrefetchRequests: 100,
displayProgress: true,
includeActiveDisplaySet: true,
},