misc changes to speed up doc search generation
Cuts about 30% of the time on my machine. original commit: 815fd1b49c7b7857aa08fd15c5ec77655ac84859
This commit is contained in:
parent
3ac30a1f35
commit
f1aa676101
|
@ -1382,12 +1382,14 @@
|
||||||
(list (format "~s" i))]))
|
(list (format "~s" i))]))
|
||||||
|
|
||||||
(define/private (ascii-ize s)
|
(define/private (ascii-ize s)
|
||||||
|
(if (= (string-utf-8-length s) (string-length s))
|
||||||
|
(list s)
|
||||||
(let ([m (regexp-match-positions #rx"[^\u01-\u7E]" s)])
|
(let ([m (regexp-match-positions #rx"[^\u01-\u7E]" s)])
|
||||||
(if m
|
(if m
|
||||||
(append (ascii-ize (substring s 0 (caar m)))
|
(append (ascii-ize (substring s 0 (caar m)))
|
||||||
(list (char->integer (string-ref s (caar m))))
|
(list (char->integer (string-ref s (caar m))))
|
||||||
(ascii-ize (substring s (cdar m))))
|
(ascii-ize (substring s (cdar m))))
|
||||||
(list s))))
|
(list s)))))
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user