OPEnSLab-OSU / Spool

GNU General Public License v3.0
2 stars 1 forks source link

Data visualizations continually make server requests #33

Open eliwinkelman opened 4 years ago

eliwinkelman commented 4 years ago

Describe the bug When viewing a device, the visualization component makes continual requests to the server for redundant information. This is not noticeable for the user, but it could lead to completely unnecessary server strain.

Expected behavior The component only request the data once, or the data state is pulled up to the parent component.

To Reproduce Steps to reproduce the behavior:

  1. Running Spool locally
  2. Create a network
  3. View your new network
  4. View the coordinator device
  5. Check the output logs from the server, they should be getting frequently repeated requests for the same information.

Additional context This is probably a side effect of repeatedly force reloading the react components with the plotly plots to account for changes in window size. If this is the issue it can probably be fixed by pulling any server request in onEffect up to the parent component (i.e. one that isn't being force reloaded).