Click to See Complete Forum and Search --> : Working with Strings


udipr
July 15th, 2001, 08:12 AM
Hello

I wrote program that work with Strings.
I read files (text files) to String variable and make some exams on that string.
The exams pass over the string.
I use VB method to handle the string (Like InStr, Mid$, Left$ etc.).

The problem is when I read big files, The exams take lot of time. Some times even 10 minute to one file !!! (and My PC is good one and fast).

There Is any way to handle with String faster ???

Thanks for any help.

Cakkie
July 15th, 2001, 09:39 AM
If there's one thing VB isn't good it, it must be handeling large strings. The thing you can do is try to process stings in small parts (like if you have a string of 1000 length, parse it 10 times using strings of 100 length)
Also, (I noticed you already doing that) use the mid$ functions in stead of Mid, all thos $ functions return strings, the ones without the $ return variants, which are slower than strings.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook