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',
|
requestType: 'prefetch',
|
||||||
preventCache: false,
|
preventCache: false,
|
||||||
prefetchDisplaySetsTimeout: 300,
|
prefetchDisplaySetsTimeout: 300,
|
||||||
|
maxNumPrefetchRequests: 100,
|
||||||
includeActiveDisplaySet: false,
|
includeActiveDisplaySet: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -151,6 +152,11 @@ export class StudyPrefetcher {
|
|||||||
const nonCachedImageIds = this.filterCachedImageIds(imageIds);
|
const nonCachedImageIds = this.filterCachedImageIds(imageIds);
|
||||||
const imageLoadPoolManager = cornerstone.imageLoadPoolManager;
|
const imageLoadPoolManager = cornerstone.imageLoadPoolManager;
|
||||||
|
|
||||||
|
imageLoadPoolManager.maxNumRequests = {
|
||||||
|
...imageLoadPoolManager.maxNumRequests,
|
||||||
|
prefetch: this.options.maxNumPrefetchRequests,
|
||||||
|
};
|
||||||
|
|
||||||
let requestFn;
|
let requestFn;
|
||||||
if (this.options.preventCache) {
|
if (this.options.preventCache) {
|
||||||
requestFn = id => cornerstone.loadImage(id);
|
requestFn = id => cornerstone.loadImage(id);
|
||||||
|
|||||||
@ -11,6 +11,7 @@ window.config = {
|
|||||||
displaySetCount: 3,
|
displaySetCount: 3,
|
||||||
preventCache: false,
|
preventCache: false,
|
||||||
prefetchDisplaySetsTimeout: 300,
|
prefetchDisplaySetsTimeout: 300,
|
||||||
|
maxNumPrefetchRequests: 100,
|
||||||
displayProgress: true,
|
displayProgress: true,
|
||||||
includeActiveDisplaySet: true,
|
includeActiveDisplaySet: true,
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user