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

List:       koffice-devel
Subject:    Re: KoStore diff for direct file extracting/adding
From:       Percy Leonhardt <percy () eris23 ! de>
Date:       2003-02-01 21:32:23
[Download RAW message or body]

On Saturday 01 February 2003 22:18, Lucijan Busch wrote:
> On Saturday 01 February 2003 22:11, Percy Leonhardt wrote:
> > Hi Lucijan,
> >
> > what about replacing
> >
> > for ( int block = 0; ( block = file.readBlock ( data.data(), data.size()
> > ) ) > 0; total += block )
> > {
> >   write( data );
> > }
> >
> > in addLocalFile with
> >
> > write( file.readAll() );
> >
> > The same could be done in extractFile using
> >
> > file.writeBlock ( device->readAll() );
> >
> > I think this is faster and the correct way to go...
>
> yes, but imagine a file has 300 MB or more what is quite possible for it
> pruposes (db-embedding).

Hmm, okay haven't thought about that one.

As I don't know the internals of Qt maybe David can comment on this, if 
copying for example 300 MB by reading and writing it in chunks of 8kB is 
faster or slower than letting Qt do it and hope that it will optimize this 
task somehow.

	Percy
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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