Files
Marcos Paulo 15d7f5e873 feat: editor blocks and lint, vault knowledge, calendar plugin, macOS menu
- notescraft-lint (rules, safe fixes, learned style) and notescraft-blocks (block model and edits); engine lint.* and block.* commands with CLI and MCP parity
- Lint tab, underlines, slash menu with preview in Source and Visual, block grip and menu, Settings > Editor and lint, Vim block keys
- Visual view: tables, note embeds, %% comments, wrapping property chips
- Vault knowledge (Related tab, assistant sources, Settings) and calendar plugin
- Sidebar top padding fixed, dot grid follows PaperCraft spacing, right-card tabs no longer cover the collapse button

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 12:36:00 -03:00

28 lines
951 B
Rust

//! Perf: `cargo test -p notescraft-knowledge --release -- --ignored --nocapture`.
use std::time::Instant;
use notescraft_knowledge::Index;
use notescraft_knowledge::tokens::query_terms;
const NOTES: usize = 10_000;
#[test]
#[ignore = "perf"]
fn ten_thousand_notes() {
let mut i = Index::default();
let t = Instant::now();
for n in 0..NOTES {
let body =
format!("# Note {n}\n\nTopic{} discusses item{} and shared words.\n\n## Part\n\n{}\n", n % 97, n % 13, "filler text about things ".repeat(40));
i.update(&format!("f{}/n{n}.md", n % 50), &body).unwrap();
}
println!("index {NOTES} notes: {:?}, {} passages", t.elapsed(), i.passage_count());
let t = Instant::now();
let hits = i.search(&query_terms("topic42 item7 shared"), 6).unwrap();
let took = t.elapsed();
println!("search: {took:?}, {} hits", hits.len());
assert_eq!(hits.len(), 6);
assert!(took.as_millis() < 200);
}