Bug#682902: mime-support: Performance issue. Unnecessery resource consumption from 'see' utility...

2013-11-23 Thread Kevin Ryde
Oleksandr Gavenko  writes:
>
> I strongly suggest remove 'system' call to avoid 'sh -c' execution. Instead
> use 'exec' without 'fork' to free CPU and memory from '/usr/bin/perl 
> /usr/bin/see'.

You mean not run /bin/sh but instead spawn the command directly?
RFC1524 under "Semantics of executable commands" says it's supposed to
be /bin/sh,

   ... it is specified that
   the command line be intended as input to the Bourne shell, i.e., that
   it is implicitly preceded by "/bin/sh -c " on the command line.)

It might be possible to sometimes notice that the shell is not required
for a particular command form.  That might even be the majority of
commands.  But my inclination would be not to worry about the extra.

Alternatively, if you meant that run-mailcap itself could exec the
/bin/sh, thereby not having a running perl waiting -- then maybe that
could be done if run-mailcap hasn't made any temporary files.  You'd
lose the warning message printed if the command fails, but maybe there's
a command-not-found message from the shell anyway in that case.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#682902: mime-support: Performance issue. Unnecessery resource consumption from 'see' utility...

2012-07-26 Thread Oleksandr Gavenko
Package: mime-support
Version: 3.52-1
Severity: normal

I found such picture in 'htop' utility:

28077 user   20   0  122M  2584  1736 S  0.0  0.1  0:00.04 ├─ /usr/bin/perl 
/usr/bin/see /home/user/net/васильева_007.jpg
28081 user   20   0  4164   584   492 S  0.0  0.0  0:00.00 │  └─ sh -c 
gthumb '/tmp/filemVzMYj'
28082 user   20   0  623M 92168 18772 S  0.0  2.3  0:02.35 │ └─ gthumb 
/tmp/filemVzMYj

I strongly suggest remove 'system' call to avoid 'sh -c' execution. Instead
use 'exec' without 'fork' to free CPU and memory from '/usr/bin/perl 
/usr/bin/see'.

I don't look to another utility from mime-support, but think that they also
have such issue...

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- 
Best regards!


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org