Eliminate RegexOptions.Compiled

RegexOptions.Compiled does not seem to improve performance and actually
is a bottleneck in most cases. I am removing it for the time being. I
may add a flag to the FormatCompiler if it is needed in the future.
This commit is contained in:
Travis Parks 2013-05-01 10:48:25 -04:00
parent 11b73b696e
commit f07a80d5a1
3 changed files with 5 additions and 5 deletions

View File

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// //
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("0.0.7.1")] [assembly: AssemblyVersion("0.0.7.2")]
[assembly: AssemblyFileVersion("0.0.7.1")] [assembly: AssemblyFileVersion("0.0.7.2")]

View File

@ -114,7 +114,7 @@ namespace mustache
} }
matches.Add(getUnknownTagRegex()); matches.Add(getUnknownTagRegex());
string match = "{{(" + String.Join("|", matches) + ")}}"; string match = "{{(" + String.Join("|", matches) + ")}}";
regex = new Regex(match, RegexOptions.Compiled); regex = new Regex(match);
_regexLookup.Add(definition.Name, regex); _regexLookup.Add(definition.Name, regex);
} }
return regex; return regex;

View File

@ -34,6 +34,6 @@ using System.Runtime.CompilerServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.7.1")] [assembly: AssemblyVersion("0.0.7.2")]
[assembly: AssemblyFileVersion("0.0.7.1")] [assembly: AssemblyFileVersion("0.0.7.2")]
[assembly: InternalsVisibleTo("mustache-sharp.test")] [assembly: InternalsVisibleTo("mustache-sharp.test")]