Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Port Listener: VFP or C++ or ??
Message
De
06/11/2013 04:11:12
 
 
À
05/11/2013 23:18:36
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01587348
Message ID:
01587382
Vues:
71
>>>I just did a quick test in the Command Window:
>>>lcBig = SPACE( 16000000 )
>>>lcBig = lcBig + SPACE( 16000000 )
>>>By my count I grew it to 31 * 16000000. Trying to add another 16000000 spaces made VFP crash with a C5 (VFP9 SP2 7423).
>
>
>lcString = REPLICATE("1234567890",1500000)
>lcString = lcString + REPLICATE("1234567890",1000000)
>? LEN(lcString)
>
string handling on a byte basis in vfp just to use older machines sounds like a bad strategy.
take a hint from Java/C# as garbage collected languages and create your StringBuffer/StringBuilder analogue.
For proof of Concept pipe into file (will be faster with large strings even if slower "medium" than a simplistic memory string)
and then decide if you implement
a stacked version adding bytes always to short strings which in turn land in an Array, File, Object or simple String
via OS function to memory based files,
hack together some FLL in C to give you a StringFoxer ;-)
or implement in the Winsock part in C#/Java and call back into fox for the needed stuff.

Old HW can be XP/W2K - anything older warrants special pay rates like for Cobol guys (hinting to check tota cost)

regards

thomas

update: Greg has given very similar advice. For the stepwise approach you will probably land at steps around 10kBytes.
Don't forget to manually garbage collect in between to have slower overall but more predictable runtimes.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform