From koffice-devel Sat Feb 01 21:47:52 2003 From: Lucijan Busch Date: Sat, 01 Feb 2003 21:47:52 +0000 To: koffice-devel Subject: Re: KoStore diff for direct file extracting/adding X-MARC-Message: https://marc.info/?l=koffice-devel&m=104413608317589 On Saturday 01 February 2003 22:32, Percy Leonhardt wrote: > 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, well i talked about the diff with him, and the 8K junk was what he sugestesed > 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 -- lucijan busch karawankenblickstraße 215 9020 klagenfurt +43 (699) 11 50 67 32 irc: lucijan @ irc.freenode.net (#kexi, #koffice, #kde-devel) icq: #43746208 _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel