Re: [exim-dev] RFC: Refactoring expand_string_internal

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Sheen, Tony
日付:  
To: exim-dev
題目: Re: [exim-dev] RFC: Refactoring expand_string_internal


-----Original Message-----
From: exim-dev-bounces@??? [mailto:exim-dev-bounces@exim.org] On Behalf
Of Nico Erfurth
Sent: 08 August 2006 19:54
To: exim-dev@???
Subject: Re: [exim-dev] RFC: Refactoring expand_string_internal

> Sheen, Tony wrote:


> > For maintainability, the worst program I ever worked on had just a

single
> > function - main() - but it ran like greased lightning which was the main
> > requirement! Formatting it nicely with 'proper' functions reduced its

speed
> > by almost 15%.
> >
> > I now tend to avoid using lots of functions...


> The question as usual is, is the (at least as I see it) better
> readability worth a little performance drop?


When your process runs daily and takes approx 6 hours, 15% was not that
small ;)

The profiler identified that most of the reduction was taken up with setting
up function calls and tearing them down afterwards.

> I just tend to prefer readability over speed, unless it's a REALLY
> performance critical part. The expansion-language IS a central part of
> exim, but does it need to "run like greased lightning"?


We now handle up to 16 million messages a week and some of our original
criteria for selecting Exim in the first place was partly based on its
superior speed and ease of configuration.

If properly documented within the code, large functions shouldn't be a
problem to maintain.

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim
details at http://www.exim.org/ ##