halkyon/halkyon_learn_client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 8e3a4e56dc
perf(dictionary): a search finds keys by their first characters, indexed
A search matched LIKE '%|eat%' over every entry's barred keys, which no
index can answer, so each one read the whole dictionary: 43-57 ms in
JMdict's 218,863 entries. dictionary_search_key holds a row per key and
loose key with its first one, two and three characters in columns of
their own and one index on them, so the keys a query starts are an
equality the index answers whatever the database's collation (Serverpod's
models can't declare COLLATE "C" or text_pattern_ops). A search now takes
5-26 ms, at 1.4 million rows and 190 MB for JMdict, and its load takes
72 s instead of 33 s.

The loader fills the table beside the entries and loads a dictionary
again when it has none. Until then, in the minutes after the deploying
server starts, the search reads the barred keys as before; those columns
stay until a later release, since the server before a deploy's switch
still searches them. The migration only creates the table and its index.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-17 19:46:37 +02:00
..
doc chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
lib perf(dictionary): a search finds keys by their first characters, indexed 2026-10-17 19:46:37 +02:00
.gitignore chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
analysis_options.yaml chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
CHANGELOG.md chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
dartdoc_options.yaml chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
LICENSE docs: licences and how to contribute 2026-09-30 20:38:16 +02:00
pubspec.yaml fix: Serverpod v4.0.4 and serverpod_offline_sync v0.0.10 2026-10-09 18:09:27 +02:00
README.md docs: licences and how to contribute 2026-09-30 20:38:16 +02:00

halkyon_learn_client

This is your Serverpod client. The code in here is mostly generated by Serverpod, but you may want to make changes if you are adding modules to your project.

Licence

Copyright (C) 2026 The Halkyon Learn contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program (LICENSE). If not, see https://www.gnu.org/licenses/.