|
-
Dec 10th, 2003, 06:58 AM
#1
Thread Starter
Lively Member
specialized techniques :)
are the any specialized techniques for opening 120 MB txt files in VB
when i try, it hangs, or seems to hang.
i can open up a 300 KB file using the same code.
thanx ;P
----------------------------------------
ÖÖ two hungry cookie monsters
-
Dec 10th, 2003, 10:37 PM
#2
Fanatic Member
Yes, its's called buffering. You can buffer a defined sized block of memory (lets say 1 MB) and parse though your data, when you get close to the end you can buffer in another 1 MB block. This may not work if for some reason you need to entire file in memory (generally, you can make it work)
-
Dec 15th, 2003, 09:16 AM
#3
Thread Starter
Lively Member
re :)
can you give me some code that puts buffering into use??
----------------------------------------
ÖÖ two hungry cookie monsters
-
Dec 16th, 2003, 05:46 AM
#4
Hyperactive Member
tell me one thing :
Does it hange when u open the file or u start reading it...
I think it should not hange when u just open the file...
-
Dec 17th, 2003, 09:48 AM
#5
Lively Member
Make sure that each line has a cr/lf at the end of it. I have the same problems periodically with files I ftp from a server to a pc. If they don't have the proper end of line characters, the program tries to read in the entire file as one line. Then it hangs.
Sometimes re-ftp'ing it and changing the type from binary to ascii (or vice versa) fixes it.
Steve
-
Dec 18th, 2003, 05:03 AM
#6
Hyperactive Member
I donnt think thats a problem.. binary files donnt have new line......
its unclear if it hangs while opening the file or reading from the file......
in my openion it should not hange while opening the file.I have worked in applications(in Unix and in C) where we open files size of GB.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|