[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: kdelibs/kimgio
From:       Michael Ritzert <kde () ritzert ! de>
Date:       2003-01-06 21:15:24
[Download RAW message or body]

Hi all,

Dirk Mueller wrote:
> On Son, 05 Jan 2003, David Faure wrote:
> 
>> > - using dynamic_cast<> AFAIK has problems with shared libs.
>> With dlopened modules, not with shared libs.
> 
> well, the kimgio plugins _are_ dlopened modules, so dynamic_cast will not
> work.

Hmm, so I guess it's just luck that d-casting to QFile* succeeds.
Any other ideas? Using a temp file for everything but a QFile[*] is acceptable 
IMO since small files are likely to stay in the disk cache anyway and the 
overhead of a temp file should be of the same order or smaller than the 
overhead of the IO (net traffic, extracting from a zip, ...). Still I would 
feel bad to copy a local file to a temp file just to open it...

Michael

[*] My initial idea to set a threshold size up to which to read it into memory 
fails at the stage of determining the file size... Of course I could still go 
like this: Create a buffer of the max. accepted size, read from the IODevice 
until the buffer is full, then go on swapping to disk. But that would
a) unneccessarily compicate things
b) waste a lot of memory for files << buffer

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic