partially

This commit is contained in:
c9s 2014-05-23 23:20:32 +08:00
parent 08bad93d56
commit 186531c5b4

View file

@ -136,9 +136,8 @@ The above route will use `\d+` as its pattern.
Optimization Optimization
----------------------- -----------------------
Simple regular expressions are optimized, through a regexp pattern to opcode Simple regular expressions are optimized through a regexp pattern to opcode
compiler, which compiles the simple pattern into a small & fast finite state compiler, which translates simple patterns into small & fast scanners.
machine.
By using this method, r3 reduces the matching overhead of pcre library. By using this method, r3 reduces the matching overhead of pcre library.
@ -146,6 +145,7 @@ Optimized patterns are: `[a-z]+`, `[0-9]+`, `\d+`, `\w+`, `[^/]+` or `[^-]+`
slugs without specified regular expression will be compiled with a `[^/]+` pattern. therefore, it's optimized too. slugs without specified regular expression will be compiled with a `[^/]+` pattern. therefore, it's optimized too.
Complex regular expressions will still use libpcre to match URL (partially).
Performance Performance