Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions editions/tw5.com/tiddlers/releasenotes/5.4.0/#9084.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
title: $:/changenotes/5.4.0/#9084
description: Optimize Freelinks plugin with Aho-Corasick for large wikis and non-Latin languages
tags: $:/tags/ChangeNote
change-type: enhancement
change-category: performance
github-links: [https://github.com/TiddlyWiki/TiddlyWiki5/pull/9084](https://github.com/TiddlyWiki/TiddlyWiki5/pull/9084)
github-contributors: s793016

This change introduces a fully optimized override of the core text widget, integrating an enhanced 'Aho-Corasick algorithm' for automatic linkification (Freelinks). The new engine drastically improves performance for large wikis and ensures correct support for non-Latin scripts (e.g., Chinese).

Highlights:
- Full switch from regex to Aho-Corasick for rapid, multi-pattern title detection, reducing linkification time from 1–5s to 100–500ms on wikis with ~12,000 tiddlers.
- Gracefully handles large title sets using a chunked insertion process and an optional persistent cache (`$:/config/Freelinks/PersistAhoCorasickCache`).
- Improved support for CJK and non-Latin text, correctly linking titles containing full-width symbols (':').
- Smart prioritization: Longer titles are matched before shorter, ambiguous ones, preventing partial or incorrect linking.
- Skips self-linking and prevents overlapping matches for clean, deterministic linkification.
- End users with large or multilingual wikis will see a massive performance boost and 100% accurate linking.
- New configuration options available for persistent cache and word boundary checking (`$:/config/Freelinks/WordBoundary`).