Skip to content

Commit

Permalink
Use large cache range for all requests
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Nov 18, 2018
1 parent c078d96 commit d600147
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/JBrowse/View/Track/Alignments2.js
Expand Up @@ -231,22 +231,22 @@ return declare( [ CanvasFeatureTrack, AlignmentsMixin ], {
const e = 30
const min = Math.max(0, region.start - len * e)
const max = region.end + len * e
this.initialCachePromise = this.initialCachePromise || new Promise((resolve, reject) => {
var cachePromise = new Promise((resolve, reject) => {
this.store.getFeatures({
ref: this.refSeq.name,
start: min,
end: max,
viewAsPairs: this.config.viewAsPairs,
viewAsSpans: this.config.viewAsSpans
}, () => { /* do nothing */}, () => {
var stats = this.store.getInsertSizeStats()
this.upperPercentile = stats.upper
this.lowerPercentile = stats.lower
this.stats = this.stats || this.store.getInsertSizeStats()
this.upperPercentile = this.stats.upper
this.lowerPercentile = this.stats.lower

resolve()
}, reject)
})
this.initialCachePromise.then(() => {
cachePromise.then(() => {
args.finishCallback = () => {
finishCallback()
setTimeout(() => {
Expand Down

0 comments on commit d600147

Please sign in to comment.