PATCH/RFC Pool allocations of QStringData objects..

David Faure kde-optimize@mail.kde.org
Sat, 18 Jan 2003 11:31:24 +0100


=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 18 January 2003 06:20, Maks Orlovich wrote:
> The vast majority of the used memory seems to be the history, which I gue=
ss is=20
> OK, considering that it's information we actually do need. However, the=20
> protocols reappear an awful lot -- logging the strings getting freed (yea=
h,=20
> that misses non-freed ones, I know), I can do:
>=20
> cat ../log|grep http$ |wc -l
>    3127
>=20
> cat ../log|grep file$ |wc -l
>     805
>=20
> cat ../log|grep https$ |wc -l
>     167
>=20
>=20
> i.e. nearly 4000 strings are just copies of "http", "https" and "file"=20
> protocol names. I wonder whether there is a way to get rid of that=20
> efficiently.. (Some sort of a global protocol name dictionary?)

Using more of KGlobal::staticQString() would get rid of the "checking for a=
 particular protocol" ones.

But since KURL stores urls as separate QStrings, a lot of the protocols you=
 see above
are actually part of the history KURLs.

=2D --=20
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Klar=E4lvdalens Datakonsult AB, Platform-independent software solutions
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+KSz872KcVAmwbhARArC3AJ0RY73Q0YFQoMkDy6EI3KyzIYHQPgCgqtm6
9sDx/Xe1e2rhn9y/r+ZYvlo=3D
=3Dv49V
=2D----END PGP SIGNATURE-----