[Development] QtCore is 2 MB larger in Qt 5

Giuseppe D'Angelo dangelog at gmail.com
Fri Jul 13 14:11:15 CEST 2012


Random thoughts:

On 11 July 2012 20:22, Thiago Macieira <thiago.macieira at intel.com> wrote:
> That's 63% bigger.
>
> Top 20 culprits:
>
> 251684 .obj/release-shared/qrc_mimetypes.o:.rodata 0x3d724 0x0

Are the mimetypes alwasy included, even on GNU/Linux systems that are
supposed to have them around (in a "standard location")? That is: is
there a way to build QtCore w/o the mimetype data?

> 157528 .obj/release-shared/pcre16_exec.o:.text 0x26758 0x0
> 113101 .obj/release-shared/pcre16_jit_compile.o:.text 0x1b9cd 0x0
> 60384 .obj/release-shared/pcre16_ucd.o:.rodata 0xebe0 0x0
> 43088 .obj/release-shared/pcre16_compile.o:.text 0xa850 0x0
> 26408 .obj/release-shared/pcre16_dfa_exec.o:.text 0x6728 0x0

This is indeed something (~400K!). Unfortunately PCRE uses its own set
of unicode tables (_ucd.o) fine tuned for what it does, i.e. it
doesn't support (for now) ICU or any similar library. The good news is
that QtCore will dynamically link to PCRE if it's found on the OS,
thus not having this code size increase. (Note that we require quite a
recent version, so only a few systems already provide the one we
need). The bad news is that if in 5.x we add the support for 8-bit
regexps, we're going to pay another 300-400K for the non-dynamically
linked case (you simply recompile everything, using a "char" instead
of a "short" as the basic type).

> 57900 .obj/release-shared/qeuckrcodec.o:.rodata 0xe22c 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
Codecs linked in instead of in plugins or what?

> 51877 .obj/release-shared/qsortfilterproxymodel.o:.text 0xcaa5 0x0
> 36993 .obj/release-shared/qitemselectionmodel.o:.text 0x9081 0x0
Move from QtGui, i.e. QtGui decreased :-)

> 26803 .obj/release-shared/qmimeprovider.o:.text 0x68b3 0x0
> 20335 .obj/release-shared/qregularexpression.o:.text 0x4f6f 0x0
> 16649 .obj/release-shared/qstandardpaths_unix.o:.text 0x4109 0x0
New public API...

No idea about the remaining parts, but thank you for the stats. It's
something interesting to talk about.
-- 
Giuseppe D'Angelo



More information about the Development mailing list