|
2026-10-13
| ||
| 04:14 | • Closed ticket [5d983ebf]: Text widget: RTL auto-detection makes mapping and editing slow plus 7 other changes artifact: e85f19be user: nab | |
| 04:13 | Fix [5d983ebf48] and [3d6de81648]: speed up the RTL auto-detection of the text widget and keep its pending state per widget. Merge text-rtl-detection (Serhiy Storchaka, with nab-text-rtl-scan): text-46.1 to 46.6, textTag-19.1 to 19.5. check-in: 3a6ffd3b user: nab tags: trunk, main | |
|
2026-10-12
| ||
| 14:21 | • Ticket [5d983ebf] Text widget: RTL auto-detection makes mapping and editing slow status still Open with 6 other changes artifact: 9592b4c0 user: nab | |
|
2026-10-08
| ||
| 14:10 | • Ticket [5d983ebf]: 3 changes artifact: ea35293e user: serhiy.storchaka | |
| 14:08 | Fix [5d983ebf48] and [3d6de81648]: speed up the RTL auto-detection of the text widget and fix its per-widget state. Combines branches text-rtl-detect-speed and nab-text-rtl-scan. The text is searched once by the widget (search -all -regexp) instead of a Tcl loop on every line, and the tk_rtl_right tag is changed only where it differs. RTL characters now include all characters with Unicode Bidi_Class R or AL (without U+FEFF), not only U+0590-U+08FF. The pending flag is per widget, and a text recreated under the same name is checked when mapped. check-in: c47ce655 user: serhiy.storchaka tags: text-rtl-detection | |
| 13:24 | • Closed ticket [3d6de816]: Text widget: RTL detection rescans the whole text at each keystroke plus 6 other changes artifact: e447be16 user: nab | |
| 13:18 | • Ticket [3d6de816]: 3 changes artifact: fdd9373c user: serhiy.storchaka | |
|
2026-09-29
| ||
| 08:18 | Add tests textTag-19.5 to 19.7 for all RTL character ranges, characters outside them, and punctuation and whitespace in RTL lines [5d983ebf48]. closed check-in: 28f9b9c3 user: serhiy.storchaka tags: text-rtl-detect-speed | |
| 07:58 | • Ticket [5d983ebf] Text widget: RTL auto-detection makes mapping and editing slow status still Open with 3 other changes artifact: 9e03029a user: serhiy.storchaka | |
| 07:56 | • Add attachment 5d983ebf48_sample.tcl to ticket [5d983ebf] artifact: 396850d7 user: serhiy.storchaka | |
|
2026-09-24
| ||
| 11:11 | • Ticket [5d983ebf] Text widget: RTL auto-detection makes mapping and editing slow status still Open with 3 other changes artifact: bd6a6add user: serhiy.storchaka | |
| 10:46 | • New ticket [5d983ebf]. artifact: 96f45d2d user: serhiy.storchaka | |
| Ticket UUID: | 5d983ebf4865037ed85ad5b43e567c5485edc2dc | |||||||||||||||||||||||||||
| Title: | Text widget: RTL auto-detection makes mapping and editing slow | |||||||||||||||||||||||||||
| Type: | Bug | Version: | 9.1b1 | |||||||||||||||||||||||||
| Submitter: | serhiy.storchaka | Created on: | 2026-09-24 10:46:49 | |||||||||||||||||||||||||
| Subsystem: | 18. [text] | Assigned To: | nobody | |||||||||||||||||||||||||
| Priority: | 5 Medium | Severity: | Important | |||||||||||||||||||||||||
| Status: | Closed | Last Modified: | 2026-10-13 04:14:18 | |||||||||||||||||||||||||
| Resolution: | Fixed | Closed By: | nab | |||||||||||||||||||||||||
| Closed on: | 2026-10-13 04:14:18 | |||||||||||||||||||||||||||
| Description: |
Since [8ce823d20c] (merge of rtl_text) the Text class bindings scan every line of the text in Tcl ( Mapping 900 text widgets with 300 lines each takes 2.1 s instead of 54 ms (9.0.5); a single text with 100000 lines takes about 1.3 s to map. Two more problems in the same code:
Only 9.1 is affected. This is a different problem from [1348333fff]. | |||||||||||||||||||||||||||
| User Comments: |
nab added on 2026-10-13 04:14:18:
Merged into trunk, [3a6ffd3b98|3a6ffd3b98]. Kevin Walzer, who wrote the RTL auto-detection, gave his green light. Thanks Serhiy for combining the two branches. nab added on 2026-10-12 14:21:53: Hi, it would be very nice to have this one on trunk. many thanks, nicolas serhiy.storchaka added on 2026-10-08 14:10:34: Combined with Nicolas's nab-text-rtl-scan (from [3d6de81648]) in branch text-rtl-detection, [c47ce655fd]:
Tests text-46.1 to 46.6 and textTag-19.1 to 19.5 (the duplicates of text-46.2 and 46.3 removed). They pass on X11 and Windows. A keystroke in 10000 lines takes 2 ms (Latin), 15 ms (Hebrew) and 8 ms (mixed), instead of 150, 79 and 71 ms on main (X11). serhiy.storchaka added on 2026-09-29 07:58:21: Attached a sample script. Results on Linux/X11 (Xvfb):
serhiy.storchaka added on 2026-09-24 11:11:59:
Fix on text-rtl-detect-speed: skip the scan if the text contains no RTL characters, remove the tag once instead of line by line, and check lines with regular expressions. The pending and auto-detection flags are now per widget and are removed on RTL characters now include all characters with Unicode Bidi_Class R or AL (Unicode 18): besides U+0590–U+08FF, also U+200F, the Hebrew and Arabic presentation forms, and U+10800–U+10FFF and U+1E800–U+1EFFF (e.g. Adlam). Mapping 900 text widgets with 300 lines now takes 48 ms instead of 2.1 s. A keystroke in a 5000-line Hebrew text takes 12 ms instead of 30 ms: text with RTL characters is still rescanned in full after each insert. A more complete fix would rescan only the changed lines; this is left for a follow-up. | |||||||||||||||||||||||||||
Attachments:
- 5d983ebf48_sample.tcl [download] added by serhiy.storchaka on 2026-09-29 07:56:13. [details]
