[ADF-5359] Improve response time for filter counters (#6800)

* [ADF-5359] Improve response time for filter counters

* Improve cache

* Update .travis.yml
This commit is contained in:
davidcanonieto 2021-03-22 10:29:54 +01:00 committed by GitHub
parent 8f8819c395
commit a68c39a806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -33,6 +33,7 @@
opacity: 0.54;
margin-left: 10px;
margin-top: 6px;
padding: 0 5px;
&.adf-active {
margin-left: 8px;

View File

@ -98,12 +98,16 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp
initFilterCounterNotifications() {
if (this.appName) {
this.taskFilterCloudService.getTaskNotificationSubscription(this.appName)
.pipe(debounceTime(5000))
.pipe(debounceTime(3000))
.subscribe((result: TaskCloudEngineEvent[]) => {
result.map((taskEvent: TaskCloudEngineEvent) => {
this.checkFilterCounter(taskEvent.entity);
});
this.filterCounterUpdated.emit(result);
if (this.updatedCounters.length) {
this.updateFilterCounters();
this.filterCounterUpdated.emit(result);
}
});
}
}
@ -114,10 +118,6 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp
this.addToUpdatedCounters(filter.key);
}
});
if (this.updatedCounters.length) {
this.updateFilterCounters();
}
}
isFilterPresent(filter: TaskFilterCloudModel, filterNotification: TaskDetailsCloudModel): boolean {