From a2e6ce936bbdf7a257a69a9b0f8782f6c6ead23f Mon Sep 17 00:00:00 2001 From: zy C Date: Sat, 26 Sep 2026 18:08:24 -0700 Subject: [PATCH] docs(AGENTS): prefer Rrbvec over O(n^2) List concat patterns --- AGENTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 1c8bbc92..8cea4b68 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -54,6 +54,8 @@ opam install . --deps-only --yes --with-test A representative core action is the Swift FFI RPC `dispatch` / `send`, which optimistic-captures a journal block (see `shared/test/logseq_chat/rpc_test.ml` and `dune build @shared/native/runtest`). +- Avoid O(n²) `List` patterns such as `List.concat` and repeated `List.append` on large sequences; when the project already depends on the `rrbvec` package, use `Rrbvec` vectors instead. + ### iOS / Android On a Mac, follow `README.md`: open `apple/Project.xcworkspace`, run the `LogseqChat App` scheme. Native core builds (`scripts/build-mobile-ios-*.sh`, `scripts/build-android-native.sh`) expect an `ocaml-demo` checkout via `LOGSEQ_CHAT_OCAML_DEMO_ROOT` (defaults to a machine-local path). Do not start Android emulators or Maestro from Cloud Agent unless that stack is explicitly in scope.