firefox-devtools / firefox-devtools/profiler
Do not dispatch unnecessarily on `selectTrackFromTid`
Open
polish
timeline
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 491
- Avg merge
- 3d 46m
- Merged PRs (30d)
- 27
Description
We have some dispatches on `selectTrackFromTid` thunk action that are about displaying global and local tracks like this:
```js
dispatch(showGlobalTrack(globalTrackIndex));
dispatch(showLocalTrack(trackReference.pid, trackReference.trackIndex));
```
We should avoid dispatching them when the track is already visible since these dispatches changes the state objects.
┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-531)
Contributor guide
Assessment
This issue has not been assessed yet.