[Qt-interest] Too many files open error on Mac OS

Ross Bencina rossb-lists at audiomulch.com
Wed Sep 29 10:03:41 CEST 2010


Scott Aron Bloom wrote:
> Since it sounds like you are having to read them in to show them, why not 
> close them after each rendering and reload them in when necessary...

My impression is that Serge thinks he is getting some beneft from not 
closing and reopening the files, but it's not clear to me what that benefit 
that is. I'd be interested to learn.

What benefit are you getting by keeping all the files open?

Is the time overhead from open()/close() significant compared to read() ?

Perhaps there are cache benefits? (although the file cache probably isn't 
flushed on close() and your description sounds like you don't need caching 
anyway).

Are you reading multiple files at once to optimise disk access for 
physically adjacent blocks? If so you probably don't need to read all 300 
files at once to get most of the benefits -- you could limit yourself to the 
system limit or to a small subset (say 20 files at a time).

Ross. 




More information about the Qt-interest-old mailing list