[Development] QtCore is 2 MB larger in Qt 5

Konstantin Ritt ritt.ks at gmail.com
Wed Jul 11 22:17:31 CEST 2012


fixup: the third section is the size in Qt 5.0 and the fourth is the size in 4.8

the qstring's rodata size increased mostly because of switching to UCD
6.1 (which is quite bigger than UCD 5.0 used in Qt 4.8) + providing
the Unicode Script property value for the entire Unicode code points
range, not only for the BMP ones.

Konstantin


2012/7/11 Thiago Macieira <thiago.macieira at intel.com>:
> That's 63% bigger.
>
> Top 20 culprits:
>
> 251684 .obj/release-shared/qrc_mimetypes.o:.rodata 0x3d724 0x0
> 157528 .obj/release-shared/pcre16_exec.o:.text 0x26758 0x0
> 134944 .obj/release-shared/qbig5codec.o:.rodata 0x20f20 0x0
> 133792 .obj/release-shared/qjpunicode.o:.rodata 0x20aa0 0x0
> 117842 .obj/release-shared/qgb18030codec.o:.rodata 0x1cc52 0x0
> 113101 .obj/release-shared/pcre16_jit_compile.o:.text 0x1b9cd 0x0
> 60384 .obj/release-shared/pcre16_ucd.o:.rodata 0xebe0 0x0
> 57900 .obj/release-shared/qeuckrcodec.o:.rodata 0xe22c 0x0
> 51877 .obj/release-shared/qsortfilterproxymodel.o:.text 0xcaa5 0x0
> 43088 .obj/release-shared/pcre16_compile.o:.text 0xa850 0x0
> 42776 .obj/release-shared/qmetaobjectbuilder.o:.text 0xa718 0x0
> 36993 .obj/release-shared/qitemselectionmodel.o:.text 0x9081 0x0
> 33118 .obj/release-shared/qstring.o:.rodata 0x26ab6 0x1e958
> 29130 .obj/release-shared/qmetatype.o:.text 0x96d0 0x2506
> 26803 .obj/release-shared/qmimeprovider.o:.text 0x68b3 0x0
> 26408 .obj/release-shared/pcre16_dfa_exec.o:.text 0x6728 0x0
> 20335 .obj/release-shared/qregularexpression.o:.text 0x4f6f 0x0
> 17929 .obj/release-shared/qfilesystemwatcher_polling.o:.text 0x4609 0x0
> 17805 .obj/release-shared/qurlidna.o:.text 0x458d 0x0
> 16649 .obj/release-shared/qstandardpaths_unix.o:.text 0x4109 0x0
>
> (the first field is the difference from 4.8, the second is the file and section,
> the third is the size in Qt 4.8 and the fourth is the size in 5.0)
>
> Note the presence of qurlidna.o there, which is misleading because QUrl got
> split into multiple files. But qurl.o + qurlrecode.o + qurlidna.o is still
> 10 kB bigger than in Qt 4.8.
>
> Full results attached. Note that it's still missing 312618 bytes in the report
>
> To generate the report:
>  1) compile Qt 4.8 and 5.0 with the *exact* same compiler options
>  2) add -Wl,-Map,mapfile to the compilation flags of the library
>  3) join the map files for the two versions:
> perl -e '
> sub parse {
>   open F, "<" . $_[0];
>   while (<F>) {
>     next unless /\.(text|rodata|data|bss).* \.obj/;
>     ($section, $ign, $size, $fname) = split;
>     $list{"$fname:$section"}{$_[1]} = hex($size);
>   }
>   close F;
> }
> parse($ARGV[0], "a");
> parse($ARGV[1], "b");
> while (($name, $entry) = each %list) {
>   print (${$entry}{b} - ${$entry}{a});
>   printf " $name 0x%x 0x%x\n", ${$entry}{a}, ${$entry}{b};
> }' mapfile-for-4.8 mapfile-for-5.0 | sort -rn
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>      Intel Sweden AB - Registration Number: 556189-6027
>      Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>



More information about the Development mailing list