anki/ts/graphs
Damien Elmes 37151213cd Move more of the graph processing into the backend
The existing architecture serializes all cards and revlog entries in
the search range into a protobuf message, which the web frontend needs
to decode and then process. The thinking at the time was that this would
make it easier for add-ons to add extra graphs, but in the ~2.5 years
since the new graphs were introduced, no add-ons appear to have taken
advantage of it.

The cards and revlog entries can grow quite large on large collections -
on a collection I tested with approximately 2.5M reviews, the serialized
data is about 110MB, which is a lot to have to deserialize in JavaScript.

This commit shifts the preliminary processing of the data to the Rust end,
which means the data is able to be processed faster, and less needs to
be sent to the frontend. On the test collection above, this reduces the
serialized data from about 110MB to about 160KB, resulting in a more
than 2x performance improvement, and reducing frontend memory usage from
about 400MB to about 40MB.

This also makes #2043 more feasible - while it is still about 50-100%
slower than protobufjs, with the much smaller message size, the difference
is only about 10ms.
2022-12-16 21:42:17 +10:00
..
added.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
AddedGraph.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
AxisTicks.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
buttons.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
ButtonsGraph.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
calendar.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
CalendarGraph.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
card-counts.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
CardCounts.svelte Fix pie chart disappearing in 2/3 column graph modes 2022-12-04 19:24:37 +10:00
CumulativeOverlay.svelte yarn upgrade --latest 2021-10-01 12:52:53 +10:00
ease.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
EaseGraph.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
future-due.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
FutureDue.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
graph-helpers.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
graph-styles.ts merge in Henrik's TS/Svelte refactor with some changes 2021-03-21 23:01:18 +10:00
Graph.svelte Use third grid column in graphs layout on wide screens (#2226) 2022-12-01 16:33:52 +10:00
GraphRangeRadios.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
graphs-base.scss Tweak graph margins again 2022-12-04 21:50:58 +10:00
GraphsPage.svelte Tweak graph margins again 2022-12-04 21:50:58 +10:00
histogram-graph.ts Re-enable formatting for .ts files 2022-11-28 09:33:04 +10:00
HistogramGraph.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
HourGraph.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
hours.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
HoverColumns.svelte Minor changes to graphs (#1566) 2021-12-29 15:04:15 +10:00
index.ts Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
InputBox.svelte yarn upgrade --latest 2021-10-01 12:52:53 +10:00
intervals.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
IntervalsGraph.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
NoDataOverlay.svelte Make the NoData overlay match the normal background color 2022-12-04 14:49:04 +10:00
RangeBox.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
reviews.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
ReviewsGraph.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
TableData.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
today.ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
TodayStats.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
Tooltip.svelte Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
tooltip.ts Re-enable formatting for .ts files 2022-11-28 09:33:04 +10:00
tsconfig.json Use custom scrollbar in stats screen, use grid layout and tweak CSS (#2154) 2022-11-02 18:23:08 +10:00
WithGraphData.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00