| View previous topic :: View next topic |
| Author |
Message |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Wed Apr 21, 2004 11:13 am Post subject: Opening very large files. |
|
|
What the best way to open files in a list or edit box?
I have files that I want to open, there size can be anything from a few bytes to 10meg +
I have tried loading it into a list but it runs out of memory.
Wordpad can do it, so how can I make VDS do it? |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Apr 21, 2004 12:03 pm Post subject: |
|
|
Dr. Dread can prolly help ya on this - he has experience with
very large files (much more than 10 mb) in VDS.
A little more detail on what you're trying to accomplish might
help - it's possible that direct file IO might be a better choice.
Also (depending on what version of VDS ya have) a standard
VDS EDIT box is limited to either 32k or 64k.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361

Last edited by Mac on Wed Apr 21, 2004 12:17 pm; edited 1 time in total |
|
| Back to top |
|
 |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Wed Apr 21, 2004 12:16 pm Post subject: |
|
|
Ok sure.
I have a huge list of hosts, and its always growing.
I am trying to come up with a good way to manage them, which I though I had done until I loaded a large file, then it started crashing on me. |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Thu Apr 22, 2004 1:57 am Post subject: |
|
|
| You could maybe have VDS split them if certain size, or use VDS BINfile. |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Thu Apr 22, 2004 6:42 am Post subject: |
|
|
| Mac wrote: | Dr. Dread can prolly help ya on this - he has experience with
very large files (much more than 10 mb) in VDS.
|
Mac's right - I've done this fairly often. VDS has quite a few problems with big lists - ya might wanna check out
this topic for more info on loading volume content into the non-visual VDS lists:
http://forum.vdsworld.com/viewtopic.php?t=1691
I've been using Mac's VDSUG.DLL some - works great but it takes some work if ya wanna do list'ish operations.
Also I did some very successful tests with Tommy's VDSLIST.DLL which you can find here:
http://www.vdsworld.com/vdsdll/vds5/
It's very fast for even big lists and has the same easy approach as normal VDS lists - would've been
using that one if I hadn't built my own list component...
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 24, 2004 7:50 am Post subject: |
|
|
| Whats a list componet ? You mean DLL? |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Sat Apr 24, 2004 1:55 pm Post subject: |
|
|
| I've been playing with opening very large files with Tommy vdslist around 200 meg. and it seams to work great I takes about 1 to 2 minutes to load the file but then to add the contents to a edit box that takes a little longer total time about 12 minutes. Thats becouse of the 3 + million lines. This was done on a p4 2.0 gig, 256 meg ram 1.4 gig swap file. If your swap file is not big enough then it won’t add the content to an edit box. It would be nice if you could load say 10 meg chunks into the edit control. Also for a little time comparison I did the same thing with the vdsug.dll and total time was about 9.5 minutes. But then as Dr. Dread mentioned you have to work out the list type functions. |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Apr 24, 2004 3:46 pm Post subject: |
|
|
Hey bbelcher,
When you used VDSug.dll, did ya change the size of the
file read buffer? The default is 4k, but can be set to any
size ya want. If ya set it to the file size, it can then read
the complete file without a loop (if ya have enough RAM).
Example:
%%bufsize = @ug(FILEREADBUFSIZE, 1024000)
BTW, direct file IO searching/editing is much faster than
using lists - not sure why you guys want to load 200 mb.
Surely ya ain't gonna scroll thru that much data...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Sat Apr 24, 2004 4:10 pm Post subject: |
|
|
I used part of your example
| Code: |
%%BYTESREAD = @UG(FILEGETSIZE, 1)
rem -- SET FILE READ BUFFERSIZE TO MAKE SURE
rem -- ENTIRE FILE1 CONTENTS CAN BE READ
%%BUFFER = @UG(FILEREADBUFSIZE, %%BYTESREAD)
|
So I assume the entire 200 meg was loaded. Yes I will be searching for key words .
example my text file that I'm searching is formated like the below example. What I am working on is to find "more text 1" then load that section into a list or what ever and save it to a seperate file. So the list would have all text between the nulls. I worked out the code for Tommys list but your VDSUG is more flexible for loading part of the file at a time but I have not done any thing like that yet.
text bla bla bla
more text 1
and more
etc
text bla bla bla
more text 2
and more
etc
text bla bla bla
more text 3
and more
etc |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Apr 24, 2004 4:45 pm Post subject: |
|
|
OK, just curious.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|