Re: [Exim] message_body efficiency hack

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Nigel Metheringham
Date:  
CC: Exim
Sujet: Re: [Exim] message_body efficiency hack
I sat down to code a more efficient message_body implementation last
night.... and found that I had misunderstood what the original code was
doing...

The message_body variable forces a read of the data file the first time
and caches the read for subsequent lookups - hence multiple uses of
that variable are not as costly as I thought.

Additionally, depending on your security settings (I think), when
receiving a message over SMTP, the message is received and committed to
stable storage. A new exim is then fork/exec-ed to process this
message. This means that gathering the message_body text during SMTP
read is impractical for most security settings.

It might be possible to do this if you have your security settings set
to seteuid or the new all-in-one user stuff - in which case you may
also be able to get yourself a speedup by not reading the header files
at all :-)
This might well be worth looking at if you are an ISP grade user who is
hitting the disk bandwidth limits hard... although you need to check
that your OS isn't caching things for you anyhow.

    Nigel.


    
-- 
[ - Opinions expressed are personal and may not be shared by VData - ]
[ Nigel Metheringham                  Nigel.Metheringham@??? ]
[ Phone: +44 1423 850000                         Fax +44 1423 858866 ]