Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/25/09 18:04:44 (16 years ago)
Author:
epitzer
Message:

Avoid recompiling regex during string parsing and cache storable attribues for faster saving. (#646)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs

    r1853 r1893  
    1919    }
    2020
     21    private static Regex re = new Regex(@"<!\[CDATA\[((?:[^]]|\](?!\]>))*)\]\]>", RegexOptions.Singleline);
     22
    2123    public override string Parse(XmlString x) {
    2224      StringBuilder sb = new StringBuilder();
    23       Regex re = new Regex(@"<!\[CDATA\[((?:[^]]|\](?!\]>))*)\]\]>", RegexOptions.Singleline);
    2425      foreach (Match m in re.Matches(x.Data)) {
    2526        sb.Append(m.Groups[1]);
Note: See TracChangeset for help on using the changeset viewer.