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

Alexander Neundorf kde-optimize@mail.kde.org
Mon, 27 Jan 2003 21:15:21 +0100


On Monday 27 January 2003 18:08, Maks Orlovich wrote:
> 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.

15 ms are not *that* much, but I would definitely vote for applying the patch.

> > > 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?

The few bytes more, at least IMO

Bye
Alex