Update of /cvsroot/magicajax/magicajax/Core/UI/Controls
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23742/magicajax/Core/UI/Controls
Modified Files:
AjaxPanel.cs
Log Message:
Made all RegEx's used by MagicAjax global in MagicAjaxModule.cs.
This improves performance with factor 15.
Note: only the RegEx's used for filtering WebPartManager script is not made global yet.
Index: AjaxPanel.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** AjaxPanel.cs 20 Dec 2005 13:11:08 -0000 1.40
--- AjaxPanel.cs 20 Dec 2005 22:48:12 -0000 1.41
***************
*** 403,409 ****
{
NameValueCollection form = Context.Request.Form;
! RegexOptions options = RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.ExplicitCapture;
!
! Regex regEx = new System.Text.RegularExpressions.Regex(Util.FormElementPattern, options);
MatchCollection matches = regEx.Matches(html);
for (int i=0; i<matches.Count; i++)
--- 403,409 ----
{
NameValueCollection form = Context.Request.Form;
!
! //here
! Regex regEx = MagicAjaxModule.FormElementRegEx;
MatchCollection matches = regEx.Matches(html);
for (int i=0; i<matches.Count; i++)
***************
*** 482,486 ****
case "select":
! Regex regExOpt = new System.Text.RegularExpressions.Regex("<option\\s((?<attrname>[-\\w]+)=\"(?<attrvalue>.*?)\"\\s?)*\\s*>.*?</option>", options);
bool multiple = attrNameValues.ContainsKey("multiple");
--- 482,486 ----
case "select":
! Regex regExOpt = MagicAjaxModule.FormElementOptionsRegEx;
bool multiple = attrNameValues.ContainsKey("multiple");
|