added a 'fast path' check that speeds up the coloring phrase of check syntax by 3x on drracket/private/rep.rkt under windows

(thank you Eli's profiler!)
This commit is contained in:
Robby Findler 2010-12-20 12:06:17 -06:00
parent 43b96fe47c
commit 4c796a6445

View File

@ -111,8 +111,9 @@ WARNING: printf is rebound in the body of the unit to always
(let ([filename (get-filename)])
(or (and (path? id)
(path? filename)
(equal? (normal-case-path (normalize-path (get-filename)))
(normal-case-path (normalize-path id))))
(or (equal? id filename) ;; "fast path" check
(equal? (normal-case-path (normalize-path (get-filename)))
(normal-case-path (normalize-path id)))))
(and (symbol? port-name-identifier)
(symbol? id)
(equal? port-name-identifier id)))))