Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing VB performance against VFP
Message
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00583110
Message ID:
00583698
Views:
22
6) Use ampersands rather than plus signs!


>The string reallocation is similar to a pre-6.0 VFP problem, made worse by VB's already-slow string handling.
>
>There are no easy answers. VB just doesn't handle strings that quickly. But, lots of seemingly small things might help --
>1) VB responds much more dramatically, performance-wise, than Fox does to WITH statements. Believe it or not, you will notice a difference!
>2) try having a second string, which you store the value to, and then concatenate onto the master string. It seems that adding a value to a string, in a loop, is particularly slow when accessing a COM object (such as ADO).
>3) Be sure to dimension the string as a string, and not a variant
>4) Consider storing the string in the value of an invisible text box, if you are working with a form. Then, grab the text box value at the end. This saved my butt once in 5.0, though I haven't re-tested in 6.0 and a friend recently said it made no difference
>5) Compile to native code.
>
>None of this should make 8 minutes of difference, though! But, I would start with these items, and then think through whether a C function or a server-side stored procedure is necessary. Another option might be to create a Fox DLL that accepts the array of the RS (via GetRows()) and does the concatenation, and then spits out the string result. The overhead of the instantiation might be worth it.
>
>Hope this helps.
>
>
>---------------------------------------------------------
>---------------------------------------------------------
>>Thanks for you attention.
>>
>>Take a look at this thread, where I give more information to Vlad about it.
>>
>>http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~?2,41,18,583339#583469
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Previous
Reply
Map
View

Click here to load this message in the networking platform