forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VDS lists - bulk problems

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Feb 04, 2003 11:46 pm    Post subject: VDS lists - bulk problems Reply with quote

I could use a little hint now. Here's the deal:

I process some flatfile databases in VDS. The program works flawless with files containing
perhaps 30,000 or 50,000 records. Sometimes a database will contain up to 150,000 lines, however,
and then VDS chokes on it.

For now I use an old DOS utility (and when I say old, I mean so old that even Mac will find it
ancient - it's dating back to '86 Laughing ) to split the input files into manageable chunks,
then I process the each chunk consecutively and assemble them back together by DOS
COPY. It works, but I don't think that it is a satisfactory solution.

So any ideas, guys?

Greetz
Dread

PS: Tried the VDSLIST.dll. I can bring it to work (in spite of a little bug), but it brings the program
to a crawl. Speed is perhaps reduced by 80% Sad

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Feb 04, 2003 11:58 pm    Post subject: Reply with quote

The problem is that VDS is loading (or trying to load) the whole
file in memory for lists. About the only way around this is to open
the file and work straight from the drive. Not sure, but I think
the VDS4 @binfile() should be capable of doing this (or maybe
VDSIO.DLL), it'd just take quite a bit more code.

BTW, I didn't even have a computer in '86 ya old geezer. Razz Laughing

I did write my own DOS file splitter/splicer though. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Feb 05, 2003 12:09 am    Post subject: Reply with quote

One more idea Dread,

Visible lists (Windows 95 only) have a limit of 32,767 items, but
the LIST CREATE lists do NOT. This can be used to work around
the Win95 limit, and ya might try this same method to speed up
your visible lists.

Load/process the file from a hidden list, and only display chunks
of it in the visible one as needed. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Feb 05, 2003 7:07 am    Post subject: Reply with quote

Mac wrote:
The problem is that VDS is loading (or trying to load) the whole
file in memory for lists. About the only way around this is to open
the file and work straight from the drive. Not sure, but I think
the VDS4 @binfile() should be capable of doing this (or maybe
VDSIO.DLL), it'd just take quite a bit more code.


Yeah, I figured out that the problem was getting the entire file into memory. VDS seems to max out
at about 100,000 lines. VDS4 @binfile won't do, because you and I are both stuck with 3.51, ya know.
But I'll try to give VDSIO a spin.

Mac wrote:
BTW, I didn't even have a computer in '86 ya old geezer. Razz Laughing


Yeah, time flies. But it's funny that a mere 16 years seems like forever when speaking of
computers Shocked

Mac wrote:
Visible lists (Windows 95 only) have a limit of 32,767 items, but
the LIST CREATE lists do NOT. This can be used to work around
the Win95 limit, and ya might try this same method to speed up
your visible lists.

Load/process the file from a hidden list, and only display chunks
of it in the visible one as needed.


I already use in-memory lists - the GUI only shows a progress, no database content.
The VDS prog just processes files for use in Perl scripts off a server.

Thanks for the input.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Wed Feb 05, 2003 10:17 am    Post subject: Reply with quote

I would be very interested in the solution as I too work with a number of lists that have problems just past 100K records. Do a search back for an old post called "Are big lists bad?"
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Feb 05, 2003 11:24 am    Post subject: Reply with quote

Hey Mark!

Very interesting. Seems like we struck the same problem. I experience it on my WinXP box,
haven't tried in another OS.

I've been playing around a bit with VDSLIST.DLL for this. It is actually quite interesting
because it works quite differently from VDS lists:

* Big lists are loaded very fast and with very little use of RAM (big lists load slowly in
VDS and a 8 Meg file takes about 100 Meg RAM on my system)

* If you cycle through a loaded list step by step, VDS lists are much faster than
calling the DLL.

So for start-to-end processing a regular VDS list will be faster (unless you run into the 100,000 limit).
But if you want to just count the lines in the file or access a limited number of specific lines
the DLL will outspeed a plain VDS list.


Greetz
Dread

BTW: There seems to be a couple of bugs in VDSLIST.DLL:
http://www.vdsworld.com/forum/viewtopic.php?t=1164

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Feb 05, 2003 7:30 pm    Post subject: Reply with quote

My solution to large files was (if starting from scratch) to limit my files
10,000 lines and then start another file.

I've been doing it this way with web site stats. I've got several client
sites that I made the cgi programs for and I keep each month's statistics
in seperate flat files. When the client needs to search for a specific entry,
I search through all the files. It doesn't seem to be too slow using
seperate files like this.

Of course, this is fine if you're starting from scratch and no other
programs require access to these files. But if you're dealing with files
that already exists and other programs require only the single file, well,
not sure about that.

-Garrett
Back to top
View user's profile Send private message
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Mon Feb 10, 2003 6:15 pm    Post subject: Reply with quote

Hey Dread,

If you're still working on this problem, I use VDSINOUT.DLL in 3.51 and it does a great job. You can R/W directly from the file or load it into memory. It took a while to get used to using it but now it works great. You can also use it to do quick appending of data if you need to write a strind a file.

moke
Back to top
View user's profile Send private message Send e-mail
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Feb 11, 2003 7:51 am    Post subject: Reply with quote

Thankx Moke, I'll try it out even though I must admit that I'm not the greatest wizard
of binaries Shocked

Hmmm, perhaps you've got a piece of code that I could have a look at ? Could make
life quite a bit easier.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Tue Feb 11, 2003 3:40 pm    Post subject: Reply with quote

Dread,
I don't know any one who looks forward to working w/ binaries but
sometimes you have no choice. This should get you started.

moke



Code:

REM - THESE EXAMPLES USE CODE FOR ASCII FILES. TO USE ACTUAL
REM - BINARY DATA CHANGE FPOSC TO FPOSB, READC TO READB & WRITC TO WRITEB
%%DB = data.csv
%%TEMP = @ENV(TEMP)
Rem COPY THE FILE TO A FOLDER WHERE YOU WILL HAVE R/W ACCESS
REM THIS IS REQUIRED FOR ANY USE OF THE DLL EVEN THOUGH YOU MAY NOT MANIPULATE THE FILE
file copy, %%db,%%temp\data.csv
%%DB = %%TEMP\data.csv
Rem MARK POSITION1 AND POSITION2 TO EXTRACT INTO VDS LIST
%%P1 = @IO(FPOSC,%%DB,1,,SEARCHSTRING1)
%%P2 = @IO(FPOSC,%%DB,1,,SEARCHSTRING2)
REM EXTRACT DATA TO A VAR
%%DATA = @IO(READC,%%DB,%%P1,%%P2,)
LIST CREATE, 1
REM  - ASSIGN EXTRACTED DATA TO LIST
REM - I'M NOT SURE IF EVERYONE IS AWARE YOU CAN ASSIGN A VAR
REM - TO A LIST ASSUMING IT IS FORMATTED W/ cr/lf. IN ADDITION
REM - TO ASSIGNING A LIST TO ANOTHER LIST ASSUMING IT IS
REM - FORMATTED W/ cr/lf
LIST ASSIGN,1,%%DATA
REM LIST 1 NOW CONTAINS THE EXTRACTED DATA

REM TO WRITE DIRECTLY TO A FILE USE THIS CODE
%2 = @IO(WRITC,STRING2WRITE,FILENAME,STARTINGPOS,ENDINPOS,PADDINGCHARSIFANY)

REM TO APPEND ONE FILE TO ANOTHER JUST USE THIS CODE
%2 = @IO(APPND,FILE1,FILE2)
Back to top
View user's profile Send private message Send e-mail
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Feb 12, 2003 6:46 am    Post subject: Reply with quote

Great moke!

That was a good jumpstart - I had something betaish up and running in just a few minutes. Now
it'll be a lot easier to do some experiments.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group