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:
parent
d7ba2fac69
commit
e4b0552db4
@ -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);
|
||||
|
||||
@ -11,6 +11,7 @@ window.config = {
|
||||
displaySetCount: 3,
|
||||
preventCache: false,
|
||||
prefetchDisplaySetsTimeout: 300,
|
||||
maxNumPrefetchRequests: 100,
|
||||
displayProgress: true,
|
||||
includeActiveDisplaySet: true,
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user