[PATCH] Un-QRegExp'ify KGuiItem::plainText()

Maks Orlovich kde-optimize@mail.kde.org
Mon, 27 Jan 2003 12:08:35 -0500


On Monday 27 January 2003 12:03 pm, Alexander Neundorf wrote:
> On Monday 27 January 2003 17:29, Maks Orlovich wrote:
> > Hi.. Currently KGuiItem uses QRegExp-based replacement to get rid of
> > accels. That's slow, and drags us down for about 15ms or so of the
> > startup time. The attached patch replaces this with a specialized
> > routine.
> >
> > Pros:
> > Cuts around 14ms of startup time - timings below.
>
> What machine is it ?

Sorry, Celeron 950. THe app is Konqueror. KStartPerf for it is around 1200ms.

>
> > Cons:
> > 1. Binary size larger (by 429 bytes with gcc-3.2.1 -O2). This can be cut
> > down to about 160 or so bytes by const-casting unicode() return on the
> > stripped string, and accessing it directly - but see 2.
>
> Doesn't matter.

Which part?