Asp.Net Jscript and Regulare expressions

smiley22432

New Member
I am posting this for information and to solicite comments (in case I am wrong) which will help us to improve our work with Jscript.Net in the future. <BR><BR>Jscript is certainly a second rate citizen in .net. The highly touted Visual Studio.Net is little more than an editor for JScript. There is very little jscript documentation for the more difficult (ado.net and xml processing) issues. <BR><BR>This appears to be especially true in the area of regular expression processing. While converting existing code using Jscript to Jscript.Net be aware that the properties of RegExp are not available in asp.net as highlighted in the .net documentation: <BR>"Note: The properties of the RegExp object are not available when running in fast mode, the default for JScript .NET. To compile a program from the command line that uses these properties, you must turn off the fast option by using /fast-. It is not safe to turn off the fast option in ASP.NET because of threading issues."<BR><BR>While there are workarounds to these issues, our experience is that regular expression processing in .Net using JScript is extremely slow (more that 50 times slower) compared to what we were used to in Jscript 5.5 and Perl (for use old guys). <BR><BR>In one example a report page using significant regular expression processing went from 1-2 seconds in asp js 5.5 wsc to more than 30 seconds in asp.net. By re-writing our regular expression processing to minimized inefficiencies, we were able to get this down to 5-6 seconds. <BR><BR>For those of us used to fast regular expression processing and who are lazy and write inefficent code this was a rude awakening. <BR><BR>At present, we are glad that ms allows us to "mix and match" asp and aspx. Instead of moving our report pages to aspx, we are leaving them in asp at the present while we implement aspx in our input streams. <BR><BR>Phil
 
Back
Top