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

List:       koffice-devel
Subject:    Re: Faster saving
From:       Thomas Zander <zander () kde ! org>
Date:       2004-04-15 6:49:54
Message-ID: 200404150849.58883.zander () kde ! org
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 14 April 2004 21:02, Nicolas Goutte wrote:
> On Wednesday 14 April 2004 15:44, David Faure wrote:
> > On Wednesday 14 April 2004 15:36, Thomas Zander wrote:
> > > On Wednesday 14 April 2004 12:33, Nicolas Goutte wrote:
>
> (...)
>
> > Well, we're still doing this on loading because it's convenient :)
> > But on saving maybe we can avoid using a huge amount of memory again
> > (and making the machine swap on every autosave...)
>
> I had not thought about autosaving. :-(
>
> But perhaps we could optimize the KZip step.
>
> Form my bag of ideas:
> - a sort of no-op zip that just stores the file uncompressed. (The data
> can then be passed to the disk without further processing.)

zip-compression is streams based; takes a minimum of memory, IMO not worth 
it.

> - using the raw XML format of StarOffice/OASIS (However it means coding
> binaries as base64 and also slightly other tags to introduce those
> base64 streams. It would also mean to have an import filter for this
> format variant.)
base64 is a lot bigger; and I doubt you can do that encoding streams based, 
which means you'll end up taking more ram with a simpler encoding (less 
processor time), not more.

> - see if using UTF-16 instead of UTF-8 with QTextStream brings any
> advantage
Worth a try; but IIRC the Qt classes use UTF-8 internally which makes me 
doubt a big difference.
And just like the above; you are suddenly going to produce more bytes 
(about twice as many) I'm not sure people will like their 40kb KWord file 
to produce a 1Mb autosave file...

Next to that; please keep in mind that writing all these formats requires 
you to be able to read them as well..

- -- 
Thomas Zander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAfjCVCojCW6H2z/QRAgyhAJsGkOWwNpHRbynyRC4gOInE8kYNhgCfdRB8
rPI8E2NoyObVvRdvnZ87VDw=
=0Kab
-----END PGP SIGNATURE-----
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://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