I have read all the posts on the subject of passing VB arrays to PBDLL
but I am trying to figure out whether it is possible to build a string
array in PB from a very large text file (using the ideas rehearsed in
such posts as 'VB smokes PB' etc etc. When the array is built I then need
to pass the array back to VB.
It is clear from several forum participants that PB should be able to load
and parse the file into an array faster than VB. To enable the routine to run
on machines with modest memory I think I will have to load blocks of the
data file at a time and deal with parsing each line in that block into
the array before loading another block of the file into memory for
processing. The source data file is larger than 250Mb and it contains
many duplicate lines of data. I am trying to parse out only the unique
lines in the file, checking if the line already exists in the array,
adding anything new and passing over anything which is a duplicate - i.e. it
already has been added to the array.
This should leave me with an array of about a thousand items which
I would then like to pass back to VB for further processing and user
interaction.
I am convinced that PB will do this job much faster than VB...could
anyone suggest the best approach or if indeed it is possible to do it
this way round rather than create an array and pass it to PB from VB.
I have considered this but I dont know what size the array would end up
once the file is parsed.
Any suggestions on this approach would be much appreciated.
My thanks in advance to anyone who can help.
------------------
Mike Letchford
but I am trying to figure out whether it is possible to build a string
array in PB from a very large text file (using the ideas rehearsed in
such posts as 'VB smokes PB' etc etc. When the array is built I then need
to pass the array back to VB.
It is clear from several forum participants that PB should be able to load
and parse the file into an array faster than VB. To enable the routine to run
on machines with modest memory I think I will have to load blocks of the
data file at a time and deal with parsing each line in that block into
the array before loading another block of the file into memory for
processing. The source data file is larger than 250Mb and it contains
many duplicate lines of data. I am trying to parse out only the unique
lines in the file, checking if the line already exists in the array,
adding anything new and passing over anything which is a duplicate - i.e. it
already has been added to the array.
This should leave me with an array of about a thousand items which
I would then like to pass back to VB for further processing and user
interaction.
I am convinced that PB will do this job much faster than VB...could
anyone suggest the best approach or if indeed it is possible to do it
this way round rather than create an array and pass it to PB from VB.
I have considered this but I dont know what size the array would end up
once the file is parsed.
Any suggestions on this approach would be much appreciated.
My thanks in advance to anyone who can help.
------------------
Mike Letchford
Comment