improve performance of backfill avoid queuing more than 1 backfill call
This commit is contained in:
parent
3bec128f5f
commit
881eb373c5
|
@ -732,11 +732,16 @@ export default RestModel.extend({
|
|||
this._excerpts = this._excerpts || [];
|
||||
const stream = this.get('stream');
|
||||
|
||||
this._excerpts.loadNext = streamPosition;
|
||||
|
||||
if (this._excerpts.loading) {
|
||||
return this._excerpts.loading.then(()=>{
|
||||
if(!this._excerpts[stream[streamPosition]]) {
|
||||
|
||||
if (this._excerpts.loadNext === streamPosition) {
|
||||
return this.backfillExcerpts(streamPosition);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue