Summary: | Don't fork a shell for pipe filter if not necessary | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Malte S . Stretz <msquadrat.nospamplease> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 1.4.3 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Malte S . Stretz
2002-08-19 15:54:34 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 19 August 2002 17:54 Malte S.Stretz wrote:
<snip>
> What I wanted to suggest is the following: Currently for each pipe
> process a bash is forked. Why don't you do it like Perl's exec()
> routine [1]; "[...] the argument is checked for shell metacharacters
> and if there are any the entire argument is passed to the system's
> command shell for parsing [...]. If there are no shell metacharacters
> in the argument it is split into words and passed directly to
> execvp which is more efficient."
>
> Sounds like a good idea doesn't it? :)
<snip>
I don't think that this makes such a difference really. Async filters
are a nice idea maybe for KDE3.2...
Marc
- --
If free-software authors lose the right to disclaim all warranties and
find themselves getting sued over the performance of the programs
they've written they'll stop contributing free software to the world.
-- Bruce Perens: Open Sources: Voices from the Open Source Revolution
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9YWAj3oWD+L2/6DgRAsf5AJ46x+Psd5H9cBDKPXdhBDFku/jmJQCgmQsR
DB5t1BP/Cf0wUVG+m9DAab8=
=KK37
-----END PGP SIGNATURE-----
On Monday 19 August 2002 23:16 CET Marc Mutz wrote: > On Monday 19 August 2002 17:54 Malte S.Stretz wrote: > <snip> > > What I wanted to suggest is the following: Currently for each pipe > > process a bash is forked. Why don't you do it like Perl's exec() > > routine [1]; "[...] the argument is checked for shell metacharacters > > and if there are any the entire argument is passed to the system's > > command shell for parsing [...]. If there are no shell metacharacters > > in the argument it is split into words and passed directly to > > execvp which is more efficient." > > > > Sounds like a good idea doesn't it? :) > <snip> > > I don't think that this makes such a difference really. I can't prove it but I think calling bash makes each call take the double time spamc needs alone. (You can configure it to log the time it needed to process a message.) (And the double memory. spamc is ~21kB big; it's made to be lightweight and fast.) That's probably not much but it adds up for many messages. Havy you ever tried to use SA with KMail? Try it. It's fun. Additionally there's the point that KMail sometimes freezes my whole KDE when it's piping. I already tried calling `nice -5 spamc` which didn't help. It might be worth a try at least (I'd provide a patch it if I spoke C++ good enough). Maybe for KDE3.2... :) > Async filters are a nice idea maybe for KDE3.2... Definitely. Malte |