DescriptionOptimize absolute() and normalize().
This short-circuits absolute() if the path is already absolute.
Detecting absolute paths is very fast, whereas join() is relatively
slow.
For normalize(), this runs a single-pass check over a path to see
whether it needs to be normalized at all. This check isn't free, but
it's a lot less costly than parsing and reserializing the path, and it
covers the common case.
See dart-lang/glob#24962
R=rnystrom@google.com
Committed: https://github.com/dart-lang/path/commit/9bad3dea80a64143e0354b4d06ce535b3945d801
Patch Set 1 #
Total comments: 2
Patch Set 2 : Code review changes #
Messages
Total messages: 5 (0 generated)
|