help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading files is slow


From: Paul Kienzle
Subject: Re: Reading files is slow
Date: Wed, 18 Sep 2002 15:32:46 -0400

Here's some recent conclusions regarding the problem:

        http://www.octave.org/mailing-lists/help-octave/2002/257

You might also want to try 2.1.36 or later since I can't reproduce
the problem on my machine, even with lines terminated by
<space><CR><LF>

On the other hand, a bare <CR> is not interpreted as a line
terminator, so if your heterogeneous environment includes Macs, you
may have to go with a scanf solution, or preprocess the mac files
with 
        dos2unix -c mac $file
or if you do not have dos2unix available, with
        tr '\015' '\012' < $file > $file.tr
        mv $file.tr $file

Hope this helps.

Paul Kienzle
address@hidden

On Wed, Sep 18, 2002 at 02:16:32PM -0400, Tom Kornack wrote:
> Notes:
> 
> 1. Indeed, I should clarify that I'm reading a text, tab-delimited 
> file. Is there an easy way (is there a common tool) to convert this 
> file into a binary file?
> 
> 2. load seems to be finicky about carriage returns and line feeds. I 
> work in an extremely heterogeneous computing environment. What is 
> octave's requirement and is there a convenient tool to convert text 
> files to have the appropriate line ending sequence?
> 
> 3. Please excuse my skull thickness, but can you clarify this process 
> of putting text data into a buffer by treating it as binary? I'm afraid 
> I need some examples. And why wouldn't this be implemented in a decent 
> text-data reading algorithm?
> 
> 4. I can't find the procedure wavread. Is this shorthand or a procedure?
> 
> Tom
> 
> 
> On Wednesday, Sep 18, 2002, at 14:13 America/New_York, Ramil G. Sagum 
> wrote:
> 
> > don't read text data as text. treat the file as binary and put it into 
> > a
> > buffer. classifying a file as 'text' adds some processing. 
> > (wavread-ing a
> > 10Meg wave file, for example, takes only a few seconds.)
> 
> 
> 
> kornack.com
> 609-688-9077 (h), 609-258-0702 (w)
> Fundamental Symmetries Lab, Princeton University
> 414C Devereux Avenue, Princeton, New Jersey 08540
> 
> 
> 
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]