MOO-cows Mailing List Archive


Re: A FUP programming question

>	I am trying to save an extensive amount of data on disk instead
>of in the database. Unfortunatly, it's not working. I don't know if you
>are familiar with the Markov Chainer, but it make some very large
>properties for the data it uses. This is my code and my error.

First of all, sorry for not replying to your previous query. I'm rather

>	where = tostr("markov/",this);
>	suspend(1);
>	data = fileread(where,args[1]);
>	args[1] is passed as one of these three strings, "words",
>"tlinks", "flinks". It calls this code once for each of the strings, but
>on the final call, for "flinks", it TBs out with an  'out of seconds' error
>on the 'fileread' line.
>	But if I type
>	;fileread("markov/#110","flink")
>I get the data just like I am supposed to with no errors at all.
>	I'm sure that the answer to my problem is a simple one, but I
>can't seem to track it down.

Remember that foreground and background tasks have different ticks/seconds
allocations. Your verb suspends and then filereads, i.e. it's a background
task. The eval is a foreground task.
Try:   ;;suspend(0);fileread("markov/#110","flink")  to test this out.
In any case you would either need to raise the background seconds
allocation, if this suits your purpose - or better read the information in
chunks, or use filegrep/fileextract to locate the info you want, then use
fileread to read a few selected lines from the file. Reading a huge file in
one go is bound to be slow.

Best luck,

     Gustavo Glusman              Founder/administrator of BioMOO    (public PGP key available)
        Visit BioMOO, the biologists' virtual meeting place, at
     ___________ ___________

Follow-Ups: References:

Home | Subject Index | Thread Index