anki/ts
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
..
card-info Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
change-notetype Improve Select component and add it back to Change Notetype screen (#2239) 2022-12-07 15:31:37 +10:00
components Add style for disabled DropdownItem (#2265) 2022-12-11 13:06:18 +10:00
congrats Add some left/right margins to congrats page 2022-12-04 13:58:50 +10:00
deck-options Improve Select component and add it back to Change Notetype screen (#2239) 2022-12-07 15:31:37 +10:00
domlib Fix overwrite surround (#2247) 2022-12-09 10:10:58 +10:00
editable Exempt MathJax images from image shrinking 2022-12-04 20:03:27 +10:00
editor Fix MathJax popup fails to appear (#2268) 2022-12-14 14:10:23 +10:00
fields Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
graphs Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
html-filter Re-enable formatting for .ts files 2022-11-28 09:33:04 +10:00
icons Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
import-csv Refactor Select component | Fix CSV import issue (#2227) 2022-12-01 19:24:26 +10:00
lib Rework spinner buttons (#2230) 2022-12-04 13:18:49 +10:00
mathjax Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
patches Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
reviewer Fix some more RTL issues (#2244) 2022-12-08 22:29:56 +10:00
sql_format Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
sveltelib Fix glitchy animation of floating elements (#2224) 2022-12-01 15:45:52 +10:00
tag-editor Partially revert #2215 2022-12-04 11:37:16 +10:00
.gitignore Update eslint to 4.22.0 2021-04-22 19:19:39 +02:00
bundle_svelte.mjs Add env var to enable sourcemaps 2022-12-04 11:37:16 +10:00
bundle_ts.mjs Add env var to enable sourcemaps 2022-12-04 11:37:16 +10:00
esbuild_jest.mjs Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
jest.config.js Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
licenses.json Bump Mathjax version 2022-12-04 18:01:26 +10:00
page.html Load page script after body created (#1802) 2022-04-19 17:16:56 +10:00
README.md add add.sh helper for adding dependency and updating licenses 2020-12-31 12:20:51 +10:00
transform_ts.mjs Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
tsconfig.json Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
yarn.sh Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00

Anki's TypeScript and Sass dependencies. Some TS/JS code is also stored separately in ../qt/aqt/data/web/.

To update all dependencies:

./update.sh

To add a new dev dependency, use something like:

./add.sh -D @rollup/plugin-alias