Go to file
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
.buildkite Fix cargo-deny exclusion 2022-11-30 13:52:49 +10:00
.cargo Re-enable formatting for .toml files 2022-11-28 09:16:28 +10:00
.config Re-enable formatting for .toml files 2022-11-28 09:16:28 +10:00
.github/ISSUE_TEMPLATE Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.vscode.dist Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
build Minor Rust cleanups (#2272) 2022-12-16 21:40:27 +10:00
cargo Replace pct-str with local ascii_percent_encoding 2022-12-09 11:49:39 +01:00
docs Minor Rust cleanups (#2272) 2022-12-16 21:40:27 +10:00
ftl Update translations 2022-12-14 14:35:40 +10:00
proto Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
pylib Fix some more RTL issues (#2244) 2022-12-08 22:29:56 +10:00
python Revert to Qt 6.3.1 on macOS 2022-12-14 15:25:10 +10:00
qt Minor Rust cleanups (#2272) 2022-12-16 21:40:27 +10:00
rslib Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
sass Add slight inset shadow to hovered buttons (#2267) 2022-12-12 15:41:23 +10:00
tools Add local copy of percent_encoding crate 2022-12-09 11:46:00 +01:00
ts Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
.deny.toml Replace pct-str with local ascii_percent_encoding 2022-12-09 11:49:39 +01:00
.dprint.json Update Chrono Crate (#2242) 2022-12-07 17:00:14 +10:00
.eslintrc.js Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.gitmodules Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.isort.cfg Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.mypy.ini Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.prettierignore Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
.prettierrc Mathjax editor improvements (#1502) 2021-11-23 10:27:32 +10:00
.pylintrc Switch back to winrt to see if it fixes slow TTS 2022-12-06 20:30:54 +10:00
.rustfmt-empty.toml Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.rustfmt.toml Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.version Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
Cargo.lock Minor Rust cleanups (#2272) 2022-12-16 21:40:27 +10:00
Cargo.toml Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
CONTRIBUTORS Fix typos (#2210) 2022-11-24 20:18:57 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
ninja Add env var to enable sourcemaps 2022-12-04 11:37:16 +10:00
package.json Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
README.md fix build badge 2021-06-24 09:21:56 +10:00
run Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
run.bat Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
rust-toolchain.toml Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
SECURITY.md add SECURITY.md 2021-09-22 22:55:19 +10:00
yarn.lock Bump Mathjax version 2022-12-04 18:01:26 +10:00

Anki

Build status

This repo contains the source code for the computer version of Anki.

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/

For more information on building, please see Development.