perf: optimized markdown rendering speed and device doc schemas

- Render device doc parameter schemas as TypeScript types instead of raw JSON schema dumps.
- Optimize marked streaming block rules and add pre-gates to reduce CPU overhead.
- Increase the markdown render cache entry budget from 32 KiB to 256 KiB.
This commit is contained in:
can1357
2026-07-27 22:19:51 +02:00
parent 4210727227
commit 222e3569bd
6 changed files with 83 additions and 8 deletions
@@ -97,7 +97,7 @@ export function parseSampleProfile(text: string): SampleProfile | null {
const lines = text.split("\n");
const analysis = ANALYSIS_RE.exec(lines[0] ?? "");
if (!analysis) return null;
const callGraphIx = lines.findIndex(line => line === "Call graph:");
const callGraphIx = lines.indexOf("Call graph:");
if (callGraphIx === -1) return null;
const header: SampleProfileHeader = {