File reading optimization
Hi,
We are porting an application from C to VB5 in which we are reading binary files using open method in VB5.But the time taken by VB is much more than the time taken by C to read the same file.As there are number of files to be read at a time ,overall performance of the application in VB5 is much slower than in C.
Any suggestions towards optimization of file reading will be of great help..
Thanks,
-arun
Re: File reading optimization
Well, Vb is very bad at handeling large strings, binary data and stuff.
One thing to do is to keep the amount you read small, rather then reading the entire file at once as a string, read it bit by bit, so the string will be smaller, and will be processed faster.
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Re: File reading optimization
Thanx for the reply Tom .Do we have any API which may accomplish this faster. We have to read the files in binary mode record by record.
Re: File reading optimization
U could keep C procedure and put it in a API function. So U can call function from VB.
hi,brt