Skip to content

Commit fb714c9

Browse files
authored
Throttle tags request (#6527)
## Motivation for features / changes For years we have been making two requests to fetch tags then canceling the first one. This occurs because the request is dispatched when either the dashboard is shown without data or a new plugin is loaded. When the dashboard is initially loaded both of these conditions are true. ## Screenshots of UI changes (or N/A) Before: ![image](https://github.com/tensorflow/tensorboard/assets/78179109/cbaffa77-4388-4222-bf84-fd93494f00b6) After: ![image](https://github.com/tensorflow/tensorboard/assets/78179109/78f13434-c0ee-402f-bf7c-5dc5ea05d0d1)
1 parent 29e5352 commit fb714c9

File tree

1 file changed

+2
-0
lines changed
  • tensorboard/webapp/metrics/effects

1 file changed

+2
-0
lines changed

tensorboard/webapp/metrics/effects/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {Action, createAction, createSelector, Store} from '@ngrx/store';
1818
import {forkJoin, merge, Observable, of} from 'rxjs';
1919
import {
2020
catchError,
21+
throttleTime,
2122
filter,
2223
map,
2324
mergeMap,
@@ -135,6 +136,7 @@ export class MetricsEffects implements OnInitEffects {
135136
tagLoadState.state !== DataLoadState.LOADING && experimentIds !== null
136137
);
137138
}),
139+
throttleTime(10),
138140
tap(() => {
139141
this.store.dispatch(actions.metricsTagMetadataRequested());
140142
}),

0 commit comments

Comments
 (0)