Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Handling very large databases

From: pa:russo:perd at: 19-May-2001 19:21

>Hi, > I'm probably missing something obvious here, but anyway: say I have a >file containing a meg or so worth of > >[string! date! integer! string! ...] [string! date! integer! string! ...] ... > >and I need to display blocks 120 to 135. Loading the whole file into memory >just for a few blocks in the middle of the file is obviously a waste of >time and resources. As this is a cgi script, and my hoster gets a but >steamed if scripts lock up the system for too long, I would like to optimise >this case so that I can just load the blocks I need, say something like > >projectdata: loadrecords/start/end project-datafile 120 135 > >Is there a way I can do this? > >Chris
Hi Chris, You can find some useful tips on "REBOL/Core User Guide 2.3". This is the beginning of the "Ports/Other Port Modes/Direct Port Access" section: ...The /direct refinement opens an unbuffered port. This is useful to access files a portion at a time, such as when a file is too large to be held in memory.... . An example follows. You'll find only sketchy informations, but it's a start. HTH -- Paolo Russo [pa--russo--perd--com] _________________ PERD s.r.l. Virtual Technologies for Real Solutions