Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory Pre-Allocation Trick?
Message
From
12/11/2002 20:03:33
 
 
To
12/11/2002 16:09:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00721182
Message ID:
00721926
Views:
30
There may be another downside...

A 1 million times loop of your 2 samples too:

- string concatenation: 9.332 seconds
- TEXTMERGE sequence: 45.210 seconds

I think that the difference makes it worth thinking about before wholeheartedly adopting the TEXTMERGE method.

cheers


>>OK, good points (Al too). It's not just 8k of space, it's 8k x running threaded processes, but I get your point about looking elsewhere to optimize.
>
>One good technique, regarding string composition, is to avoid stuff like
>
>
lcString=" some text here "+lcVariable1+chr(13)
>lcString=lcString+" more text here "+lcVariable2+chr(13)
>lcString=lcString+" yet more text here "+lcVariable3+chr(13)
>
>because it can be done as
>
text textmerge to lcString noshow
>some text here {{lcVariable1}}
>more text here {{lcVariable2}}
>yet more text here {{lcVariable3}}
>endtext
>
>(I've assumed Set Textmerge Delimiters to be {{ and }} so the html parser wouldn't treat them as tags.)
>
>This specially makes sense when you're building a webpage and have a lot of such stuff. The only downside to this is that you can't nest it, i.e. if one of the expandable things is a function call, the function can't do its own textmerge.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform