Energy-Visualizer / eviz

Energy Visualizer (Summer 2024)
0 stars 0 forks source link

Sankey Crashes #20

Open kenny5033 opened 2 weeks ago

kenny5033 commented 2 weeks ago

With certain queries, the sankey maps begin to crash. The browser tab takes up an inordinate amount of resources.

Example: CLPFU a2 Germany PCM Energy Final IEA Not including NEU 1970

To look into:

kenny5033 commented 2 weeks ago

Possible fix:

Cons: Lose interactivity provided by Plotly.

rpruim commented 2 weeks ago

How much javascript is associated with each plotly plot vs with the plotly library? Does the library get reloaded with each graphic?

kenny5033 commented 2 weeks ago

Each plotly plot comes with a chunk of script that actually renders the plot using the plotly library, which is only included once when the whole page loads. From my testing, the issue is in the plot being rendered client-side and the only thing changing client side, besides a few new divs for the plot to live in, is the chunk of javascript being delivered with a new plot.

kenny5033 commented 2 weeks ago

Here is an example of the javascript delivered with a plot: Screenshot from 2024-06-17 10-22-13

kenny5033 commented 1 week ago

After today's meeting we know that the sankeys we currently have are slightly wrong (#35). I don't know or think that it will have a large impact on this problem, but it is a possibility.