Re: [exim] Idea: Predefined macros

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Jan-Piet Mens
Cc: exim-users, Magnus Holmgren
Asunto: Re: [exim] Idea: Predefined macros
On Wed, 2 May 2007, Jan-Piet Mens wrote:

> > If you have a pile of macros defined, Exim is going to scan each config
> > line for those macros every time it reads the config, which is something
> > that it does often.
>
> Surely Exim has to do that anyway, to determine whether a macro is used?
> I don't see how carrying along a few predefined macros would mean a degrade
> in performance...


Suppose you define 100 macros. Then for each input line that Exim reads,
it obeys

  for (i = 0; i < 100; i++)
    Search the line for occurrences of macro number i


Therefore, the larger i, the more work is done. For each line, remember.
Now, whether this degradation is noticeable, or whether it matters, is a
judgement call. I was just pointing out that it will occur.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book