1. Euman - memory use

On 22 Mar 2004, at 12:25, H.W Overman wrote:

> 
> 
> Kat,
> 
> This was a preliminary version I wrote for Allen back at the beginning
> of his project, I have several versions I sent him but this one is what
> you would probably be interested in...
> 
> Two parts (.exw programs) are here, one to create and write the file, the
> other to read the file...
> 
> I hope I hadnt changed anything to screw this up over time, Im in Linux right
> now so I cant test it but it should still be ok... Note: possible to tweak
> further!

I tried running the code you sent, but when it's memory use gets up to 56 
megabytes, i shut it down. It seems too high for an 8meg file, even for 
Euphoria. What is normal for it?

Kat

new topic     » topic index » view message » categorize

2. Re: Euman - memory use

On Wednesday 24 March 2004 06:04 am, Kat wrote:
>
> On 22 Mar 2004, at 12:25, H.W Overman wrote:
> > Kat,
> >
> > This was a preliminary version I wrote for Allen back at the beginning
> > of his project, I have several versions I sent him but this one is what=

> > you would probably be interested in...
> >
> > Two parts (.exw programs) are here, one to create and write the file, t=
he
> > other to read the file...
> >
> > I hope I hadnt changed anything to screw this up over time, Im in Linux=

> > right now so I cant test it but it should still be ok... Note: possible=

> > to tweak further!
>
> I tried running the code you sent, but when it's memory use gets up to 56=

> megabytes, i shut it down. It seems too high for an 8meg file, even for
> Euphoria. What is normal for it?
>
> Kat

Hi Kat,

This was one method for reading in the binary file and making
Euphoria sequence data from that file.

The loop near the bottom is what does this:

<code>
-- Plus, this assumes binary read and no crlf chars exist
trace(1)
line = repeat(0, lFileLen / 8)
atom lIndex

if result then=A0 =A0 =A0=20
=A0 =A0cMaxIndex = lpFileBuff + lFileLen
=A0 =A0cIndex = lpFileBuff
=A0 =A0lIndex = 1
=A0 =A0
=A0 -- tweak by Tommy Carlier
=A0 =A0while cIndex < cMaxIndex do
=A0 =A0 =A0 line[lIndex] = peek({cIndex, 8})
=A0 =A0 =A0 cIndex += 8
=A0 =A0 =A0 lIndex += 1
=A0 =A0end while=A0 =A0 =A0
end if
</code>

This consumes a great amount of ram and was a test for Allen.
Thats why I put the trace(1) above the loop.

Take this code (above) out to get the time it took to plain read the file.

The time( ) as the code stood (posted) is time to read the file and to
convert the binary data to small chunks of sequence length(8) data=20

The test was to prove that writting the data to file in binary would
save huge amounts of HD space but still allow for him to peek the
data at any index to create the needed sequence for comparison
while still beating Euphoria's slow file read methods.

Hope this helps,
Euman

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu