[dev] [commits] Horde branch master updated. 23d8fd6f05716d237f59456260930aadcf19071c
Michael M Slusarz
slusarz at horde.org
Tue Aug 3 04:25:37 UTC 2010
Quoting Jan Schneider <jan at horde.org>:
> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>> Quoting Jan Schneider <jan at horde.org>:
>>
>>> Zitat von Michael M Slusarz <slusarz at horde.org>:
>>>
>>>> commit c2918c2002db8b02802e94137488b26ca56e7e16
>>>> Author: Michael M Slusarz <slusarz at curecanti.org>
>>>> Date: Wed Jul 14 00:46:47 2010 -0600
>>>>
>>>> Disable this sort by default.
>>>>
>>>> Admins should really sort by hand if this isn't an acceptable sort in
>>>> their language. Otherwise we are wasting a bunch of CPU cycles on every
>>>> page for no good reason (sorting is not a trivial task).
>>>>
>>>> horde/config/nls.php | 5 +++--
>>>> 1 files changed, 3 insertions(+), 2 deletions(-)
>>>
>>> Please revert, there is no "their language". And sorting a
>>> 20-element-list is really not a cpu killer.
>>
>> Agreed about the "their language" part. That was an ignorant
>> statement on my part and I retract it.
>>
>> However, disagree on the other part. Sorting is a non-trivial
>> thing (xcache profiling demonstrates this). What is even worse is
>> sorting on every single page load when you don't use the results of
>> that sort 99.9% of the time. We use the sorted encodings list in
>> exactly 4 places - 1 place in Fima, on 2 options pages (compose,
>> viewing) in Imp, and on the import/export page in Turba. It makes
>> much more sense to do the sorting only when needed - this is a
>> display consideration.
>
> The question is why we load the languages on each request anyway.
> But your current solutions works for me too and is probably leaner
> than caching the languages in the session.
Right now there is a bunch of code (in Registry but also elsewhere)
that accesses the configuration array on every page. This code needs
to be rewritten to use a session cached value instead. A worthy goal,
but it's not something that can be done in 10 minutes.
michael
--
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list