nr1-status-pages icon indicating copy to clipboard operation
nr1-status-pages copied to clipboard

Optimize polling data flow

Open norbertsuski opened this issue 4 years ago • 1 comments

Summary

Current implementation has following issues with polling optimization which can be improved:

  • one tile is fetching all data twice - once for summary and once for recent incidents, sometimes it is the same source of information that could be fetched once
  • tile itself can fetch all data and than pass last incidents to small timeline on tile, instead of creating two Network objects to fetch data
  • when opening big timeline, new polling process starts, which is getting the same data as tile
  • when removing tile, data is still polled in background

Possible Solution

  • [x] fetch data once and format as summary and recent incidents in main StatusPage component (if possible)
  • [x] remove unnecessary Network object initialization in CurrentIncidents and pass incidents from StatusPage
  • [ ] add possibility to handle onClose event when StackedNerdlet is closed which will allow to stop polling data
  • [x] clear polling when user deletes tile

norbertsuski avatar Jul 16 '20 11:07 norbertsuski