bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cost of popen()


From: Hideki IWAMOTO
Subject: Re: cost of popen()
Date: Mon, 20 Jun 2005 00:06:21 +0900

On Sat, 18 Jun 2005 10:28:15 +0900, Shigio Yamaguchi wrote...
> > Exuberant Ctags and Emacs ctags can receive two or more files at a command 
> > li
> ne.
> > The performance can be improved keeping compatibility by processing two or 
> > mo
> re files by one parser.
> 
> Gtags-parser also accepts two or more arguments. :)
> I agree. It is the best method for it to solve the problem.

This is a patch for improving the performance of "global -f" 
at the time of processing multiple files.
If this is O.K. I will also write a patch to gtags, 

diffstat:
 global.c |  122 ++++++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 98 insertions(+), 24 deletions(-)

[current CVS version]

[linux-2.0.40]$ time  global -P | xargs   global -f >/dev/null
1.861user 2.475system 4.343elapsed 99.82%
[linux-2.0.40]$ time  global -P | xargs   global -fr >/dev/null
4.717user 5.622system 10.357elapsed 99.83%
[linux-2.0.40]$ time  global -P | xargs   global -fs >/dev/null
5.784user 5.662system 11.472elapsed 99.78%
[linux-2.0.40]$ export GTAGSLABEL=ctags-exuberant
[linux-2.0.40]$ time  global -P | xargs   global -f >/dev/null
14.422user 15.522system 30.011elapsed 99.77%
[linux-2.0.40]$ export GTAGSLABEL=ctags-emacs
[linux-2.0.40]$ time  global -P | xargs   global -f >/dev/null
3.028user 3.183system 6.228elapsed 99.71%


[patched version]

[linux-2.0.40]$ time  global -P | xargs   global -f >/dev/null
1.233user 0.223system 1.458elapsed 99.82%
[linux-2.0.40]$ time  global -P | xargs   global -fr >/dev/null
3.624user 0.497system 4.129elapsed 99.81%
[linux-2.0.40]$ time  global -P | xargs   global -fs >/dev/null
4.639user 0.607system 5.262elapsed 99.69%
[linux-2.0.40]$ export GTAGSLABEL=ctags-exuberant
[linux-2.0.40]$ time  global -P | xargs   global -f >/dev/null
5.383user 0.789system 6.194elapsed 99.64%
[linux-2.0.40]$ export GTAGSLABEL=ctags-emacs
[linux-2.0.40]$ time  global -P | xargs   global -f >/dev/null
2.138user 0.245system 2.387elapsed 99.80%

----
Hideki IWAMOTO  address@hidden

Attachment: global-parsefile.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]