nens / parramatta-dashboard

Dashboard web-app for the City of Parramatta
https://parramatta.lizard.net/clients/parramatta/
GNU General Public License v3.0
0 stars 0 forks source link

Analyse performance improvement (Parramatta) dashboards #222

Closed lexvand closed 5 years ago

lexvand commented 5 years ago

Parramatta’s only complaint about their dashboard is the time it takes to load the (timeseries) tiles.

Determine what the actual bottleneck is, backend or frontend. And what would be possible measures to decrease loading times?

____________________________________________________________________________________________________________

Conclusion:
The majority of the delay (25 seconds up tomore then 60 seconds) seems to be in the Plotly engine.
I would like a second pair of eyes to confirm this findings

Analysis by Tom:
I inspected the network tab in both chrome and firefox but this was very confusing.
In chrome it seemed that the delay was because of the server.
In firefox it seemed that the first 20 seconds of delay was on server and last 20 second was on client
I therefore started commenting out code.

Options:

___________________________________________________________________

CONCLUSION

after investigation together with Remco:

Cause:

The plotly library (or probably tiles in general) are retriggered to often.

We see that by commenting out plotly we reach a factor 4 improvement increase.

We should trigger Plotly less often to rerender.

This currently happens because each tile is connected to the whole store.

Possible solutions:

communication redux metadata only in container component (tile)
This component passes it as props to the chart.
Chart thus does not need to be connect te redux metadata
In short:
Container metadata,
chart real data.

In map state to props we need to filter only the data we need.
In shouldComponentUpdate we decide if the data is changed
___________________________________________________________________

[FRNT-240] created by joeri.verheijden

lexvand commented 5 years ago

Remco Gerlich

Hi Remco,
Feel like helping me by confirming my latest findings that Plotly causes the major hiccup?
kr Tom

by 5b3b278169812b2ef3f78d91

lexvand commented 5 years ago

Remco Gerlich

Hi Remco,

This ticket concerning the slow performance.

It is a problem for both Parramatta and the tile dashboard.

I think it is probably a important problem we need to tackle as soon as possible.

A similar problem might also happen with the 3di livesite.

kr Tom

by 5b3b278169812b2ef3f78d91

lexvand commented 5 years ago

Tom de Boer Remco Gerlich are you planning on using the plotly library in the new 3Di livesite? Then, i think, it’s good to inform Jonas of these known issues

by 5b03d19111b5d05139269675

lexvand commented 5 years ago

Yes, but the problem isn’t Plotly, it’s the fact that receiving a response for 1 timeseries request from the backend causes all the tiles to re-render. Everything in the dashboards is too interconnected.

This causes planning trouble with the 3Di live site, I’m emailing you about it now.

by remco.gerlich

lexvand commented 5 years ago

Ok. Thanks!

by 5b03d19111b5d05139269675