findCodeBlockRegions scanned every region found so far for each inline code match, and accepted inline spans were appended to the same array, making it quadratic in the number of inline spans. preprocessLaTeX runs on the full message text every animation frame while streaming and calls it twice. Fenced and inline matches are both ascending and non-overlapping, so walk the fenced list with a cursor instead. Only fenced regions can contain an inline span, so previously accepted inline regions never needed checking. 34,670 chars with 2,100 inline spans: 5.51ms per call to 0.12ms. Co-authored-by: shimmyshimmer <info@unsloth.ai> |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_manifest.py | ||
| install_node_prebuilt.py | ||
| install_python_stack.py | ||
| install_whisper_prebuilt.py | ||
| LICENSE.AGPL-3.0 | ||
| MCP.md | ||
| node_prebuilt_pins.json | ||
| package-lock.json | ||
| package.json | ||
| prebuilt_core.py | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||