Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimization on the Occurs() method
Message
From
10/08/2006 00:56:20
 
 
To
10/08/2006 00:52:27
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01144405
Message ID:
01144421
Views:
9
>You're "creating" strings inside your loop with this statement:
>
>                lcString = Mid(lcString, lnLocation + 2)
>
>This is where you would benefit from using StringBuilder.
>
>The example from the VFP Toolkit for .NET doesn't need StringBuilder because it doesn't do this.

The first example loops thru all characters. So, if I am passing a 17k string, for example, that would mean it would process in the loop 17000 times. I like the second example as it uses a position to start on the next occurence. I will adjust for that one. I use StringBuilder on a lot of places. It is just that this one hasn't been optimized yet. I will do that now. Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform