reading large text files faster?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've been testing some of the example streamreads on 40 meg text file. I
notice that it take awhile to read in debug.write and textbox1.text multi
line.

but if i use a textpad program, example editplus, it loads a lot quicker.

My question is... what is the limitation here or is there something that
can be done different for faster reading?
 
vbnewbie said:
I've been testing some of the example streamreads on 40 meg text file. I
notice that it take awhile to read in debug.write and textbox1.text multi
line.

but if i use a textpad program, example editplus, it loads a lot quicker.

My question is... what is the limitation here or is there something that
can be done different for faster reading?

Are you trying to read the entire file in a once, or reading it line by
line in a loop?

Reading it in all at once is p[robably the "fastest" way, but also the
most memory-intensive. Reading it line by line will be slower, but also
more "gentle" on your memory usage.

HTH...
Chris
 
vbnewbie said:
I've been testing some of the example streamreads on 40 meg text file. I
notice that it take awhile to read in debug.write and textbox1.text multi
line.

but if i use a textpad program, example editplus, it loads a lot quicker.

My question is... what is the limitation here or is there something that
can be done different for faster reading?

Some text editors don't load the whole file. Instead, they only load the
part that is visible in the text editor (and some more parts). Imagine you
run your application on a machine with 128 MB of physical RAM and you load
an 100 MB file...

Notice that loading/displaying is much faster if you assign the whole
content to the textbox once instead of incrementally building up the
textbox's content.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top