[Interest] Size of libQt5Core in 5.3
André Pönitz
apoenitz at t-online.de
Mon May 12 00:23:19 CEST 2014
On Sun, May 11, 2014 at 02:05:22PM -0700, Thiago Macieira wrote:
> print "$total\n";
> }' QtCore.map
> [...]
> 45476 .obj/qobject.o
> 48523 .obj/qregexp.o
> 53198 .obj/qstatemachine.o
> 53657 .obj/qsettings.o
> 58416 .obj/qdatetime.o
> 58836 .obj/qvariant.o
> 59344 .obj/qlocale.o
> 83403 .obj/qstring.o
> 89452 .obj/qxmlstream.o
> 192595 .obj/qcryptographichash.o
> 2160601
>
> Note that the total doesn't match the section size because it doesn't include
> padding between files and because the script didn't include the non-inlined
> inlined functions.
>
> If we run the same for the .rodata section:
> 13696 .obj/qtimezoneprivate.o
> 15412 .obj/moc_qlocale.o
> 16156 .obj/qurlidna.o
> 33644 .obj/moc_qnamespace.o
> 99797 .obj/qtldurl.o
> 168104 .obj/qstring.o
> 248808 .obj/qlocale.o
> 251684 .obj/qrc_mimetypes.o
> 924845
>
> The above are easy to explain: QLocale and and the Qt namespace have a lot of
> enums, which cause their meta objects to grow (the names aren't compressed);
> qurlidna.cpp and qstring.cpp include a large chunk of Unicode tables and
> stringprep tables; qlocale.cpp includes the CLDR data that John talked about;
> finally, mimetypes.qrc contains the MIME type data that QMimeType requires to
> run.
>
> In other words, no easy gains here. QtCore is big because it contains a lot of
> stuff, none of which is really big.
99797 .obj/qtldurl.o
>From the commit message:
Add QUrl::topLevelDomain() and move TLD table from QtNetwork to QtCore
Move Qt's copy of the Mozilla public suffix list from QtNetwork
to QtCore and use it to expose a new API function QUrl::topLevelDomain().
This function returns the section of the url that is a registrar-controlled
top level domain.
The motivation for this new API is to allow QtWebKit implement a Third-Party
Cookie blocking policy. For this QtWebKit needs to know the element of the url
that is the registry-controlled TLD. Without this knowledge it would end up
blocking third-party cookies per host rather than per registry-controlled domain.
How odd.
Andre'
More information about the Interest
mailing list