Every time people access the flamescope's heatmap, the server processes the perf output data which makes the user awaited. So I am considering to cache preprocessed or first-returned data.
Structure of the response is quite simple;
{
"columns": [0, 1, .....],
"rows": [980, 960....],
"values": [ [2, 2, ...], [...], [...], ....],
"maxvalue": 16,
}
The most quick hack to cache it is storing in sessionStorage in local browser. Better idea is to save the data as a metadata beside actual data (In that case, we need to decide naming convention for metadata). Other idea is to store data in DB.
I am going to implement a cache anyway, but I want to ask this before starting, which is, what kind of cache is easier to accept for you?.
Every time people access the flamescope's heatmap, the server processes the perf output data which makes the user awaited. So I am considering to cache preprocessed or first-returned data.
Structure of the response is quite simple;
The most quick hack to cache it is storing in sessionStorage in local browser. Better idea is to save the data as a metadata beside actual data (In that case, we need to decide naming convention for metadata). Other idea is to store data in DB.
I am going to implement a cache anyway, but I want to ask this before starting, which is, what kind of cache is easier to accept for you?.