This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Stat vs slurp vs linux 2.6.22


Mark Wielaard wrote:
Hi Andrew,

On Wed, 2007-07-25 at 09:30 -0400, Andrew Cagney wrote:
It might make sense to rewrite slurp as a normal java class so these
cross C/Java error handling issues. Is there a reason for slurp to have
to be written in C/CNI?
-> memory pressure; notice how it does a callback
-> performance

Interesting. It does feel a little like a premature optimization though, seeing that we are finding bugs in it because of the Java/C/CNI mixture of error and memory handling that are hard to track down.

We're talking here about Scan, not slurp; the first implementation did use File et.al. It was changed from java to a builder to reduce memory pressure and produced a dramatic performance boost.

Scan, by not double allocating memory read also keeps memory pressure down.

Going forward, the less memory dropped on the floor by the core, the easier it will be to push more of this into C++.

Andrew




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]