The SankeyPlot object now has a df attribute that's initialized with the object and updated whenever generate_plot is called. By using this attribute we can avoid a bunch of unnecessary regenerations of the dataframe.
This technically cuts the generate_gui time at least in half (85ms -> 43ms for a plot with 4 classes, 344ms -> 107ms for a plot with 17 classes), although that may not be noticeable since most of the time is spent waiting for Earth Engine data.
The
SankeyPlot
object now has adf
attribute that's initialized with the object and updated whenevergenerate_plot
is called. By using this attribute we can avoid a bunch of unnecessary regenerations of the dataframe.This technically cuts the
generate_gui
time at least in half (85ms -> 43ms for a plot with 4 classes, 344ms -> 107ms for a plot with 17 classes), although that may not be noticeable since most of the time is spent waiting for Earth Engine data.Close #36