[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: New i18n interface for KDE 4, second try
From:       Ingo =?iso-8859-15?q?Kl=F6cker?= <kloecker () kde ! org>
Date:       2005-10-30 18:45:26
Message-ID: 200510301945.37244 () erwin ! ingo-kloecker ! de
[Download RAW message or body]


On Sunday 30 October 2005 18:19, Chusslove Illich wrote:
> > [: Ingo Klöcker :]
> > I wonder whether we really need such a complicated solution for
> > multiple arguments. I'm a bit concerned about the performance
> > penalty that's caused by this complicated construction.
>
> Performance is really not an issue here, as we're talking about GUI
> stuff.
>
> Anyway, if you'd really want to know, this particular thing (simple
> message, three placeholders, all QString arguments: the worst case)
> slow current code down about twice, but still delivering over 200,000
> messages per second on my 1.67 GHz. And if I make all tree arguments
> ints, than it is only factor 1.3 slower. In general, any further
> complication (like plurals, context, future enhancements) will only
> narrow this gap of few indirections.
>
> > Therefore at least for me, in the multiple argument case, something
> > like i18n( const char *text, const QString & a1, const QString &
> > a2, const QString & a3 )
> > would suffice because currently for using QString::arg( a1, a2, a3
> > ) we already need to convert numbers to QString ourselves.
>
> But if you don't have to, why not allow for that (performance not
> being the issue)?

Thanks for checking the performance penalty. As far as I'm concerned, 
please go ahead with your proposal.

Regards,
Ingo

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic