public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* Re: [gentoo-dev] how long does it take portage to parse an ebuild?
  2003-10-28 14:44 [gentoo-dev] how long does it take portage to parse an ebuild? Andrew Gaffney
@ 2003-10-27 14:52 ` Stuart Herbert
  2003-10-28 15:04   ` Andrew Gaffney
  0 siblings, 1 reply; 10+ messages in thread
From: Stuart Herbert @ 2003-10-27 14:52 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: signed data --]
[-- Type: text/plain, Size: 1143 bytes --]

On Tuesday 28 October 2003 2:44 pm, Andrew Gaffney wrote:
> Is there a way to determine how long it takes 'emerge' to parse an ebuild
> and figure out what packages it is dependent on according to USE flags? I
> wrote a Perl program that does this and it takes 0.049 seconds to parse
> '/usr/portagemedia-video/mplayer/mplayer-1.0_pre2.ebuild' and tell me what
> the dependencies are with the current USE flags. I want to compare it to
> how fast Portage does this on my particular setup to get an acurate
> comparison.

How about 'time emerge -p <package>'?

As an aside, the strace output of running an emerge or an ebuild makes 
interesting reading.

Best regards,
Stu
-- 
Stuart Herbert                                              stuart@gentoo.org
Gentoo Developer                                       http://www.gentoo.org/
Beta packages for download            http://dev.gentoo.org/~stuart/packages/
Come and meet me in March 2004                 http://www.phparch.com/cruise/

GnuGP key id# F9AFC57C available from http://pgp.mit.edu
Key fingerprint = 31FB 50D4 1F88 E227 F319  C549 0C2F 80BA F9AF C57C
--

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] how long does it take portage to parse an ebuild?
  2003-10-28 15:04   ` Andrew Gaffney
@ 2003-10-27 15:13     ` Mike Frysinger
  2003-10-28  2:30       ` Andrew Gaffney
  2003-10-28 15:28       ` Andrew Gaffney
  0 siblings, 2 replies; 10+ messages in thread
From: Mike Frysinger @ 2003-10-27 15:13 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: signed data --]
[-- Type: text/plain, Size: 149 bytes --]

On Tuesday 28 October 2003 10:04, Andrew Gaffney wrote:
> Is there a quicker
> way to determine the USE flags on the fly?

portageq envvar USE
-mike

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] how long does it take portage to parse an ebuild?
  2003-10-28 15:28       ` Andrew Gaffney
@ 2003-10-27 16:06         ` Mike Frysinger
  2003-10-27 16:08         ` Peter Ruskin
  1 sibling, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2003-10-27 16:06 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: signed data --]
[-- Type: text/plain, Size: 503 bytes --]

On Tuesday 28 October 2003 10:28, Andrew Gaffney wrote:
> Mike Frysinger wrote:
> > On Tuesday 28 October 2003 10:04, Andrew Gaffney wrote:
> >>Is there a quicker
> >>way to determine the USE flags on the fly?
> >
> > portageq envvar USE
>
> That take twice as long to run as 'emerge info | grep USE'.

so the way may not be quicker, but portageq is the way you're supposed to get 
portage related information for scripts and stuff ...
file a bug that it currently isnt very fast ;)
-mike

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] how long does it take portage to parse an ebuild?
  2003-10-28 15:28       ` Andrew Gaffney
  2003-10-27 16:06         ` Mike Frysinger
@ 2003-10-27 16:08         ` Peter Ruskin
  2003-10-28 23:59           ` Andrew Gaffney
  1 sibling, 1 reply; 10+ messages in thread
From: Peter Ruskin @ 2003-10-27 16:08 UTC (permalink / raw
  To: gentoo-dev

On Tuesday 28 Oct 2003 15:28, Andrew Gaffney wrote:
> That take twice as long to run as 'emerge info | grep USE'.

Hmmm, not here:

# time portageq envvar USE
x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod 
mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib 
berkdb slang readline arts tetex aalib svga ggi tcltk java mysql 
postgres X sdl gpm tcpd pam libwww perl python esd imlib oggvorbis gtk 
qt kde motif opengl mozilla cdr scanner acpi -alsa artswrappersuid doc 
dvd faad -gdbm -gnome innodb joystick maildir mbox moznoirc moznomail 
moznocompose nocardbus odbc ppds samba -ssl sse tiff usb wmf xvid 
-xinerama

real    0m0.637s
user    0m0.630s
sys     0m0.000s

# time emerge info | grep USE
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad 
mikmod mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms 
xv zlib berkdb slang readline arts tetex aalib svga ggi tcltk java 
mysql postgres X sdl gpm tcpd pam libwww perl python esd imlib 
oggvorbis gtk qt kde motif opengl mozilla cdr scanner acpi -alsa 
artswrappersuid doc dvd faad -gdbm -gnome innodb joystick maildir mbox 
moznoirc moznomail moznocompose nocardbus odbc ppds samba -ssl sse tiff 
usb wmf xvid -xinerama"

real    0m0.916s
user    0m0.820s
sys     0m0.050s

Peter
-- 
======================================================================
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 
2.4.23_pre7-gss)
i686 AMD Athlon(tm) XP 3200+
======================================================================


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] how long does it take portage to parse an ebuild?
  2003-10-27 15:13     ` Mike Frysinger
@ 2003-10-28  2:30       ` Andrew Gaffney
  2003-10-28 20:17         ` Marius Mauch
  2003-10-28 15:28       ` Andrew Gaffney
  1 sibling, 1 reply; 10+ messages in thread
From: Andrew Gaffney @ 2003-10-28  2:30 UTC (permalink / raw
  To: Gentoo Dev

Mike Frysinger wrote:
> On Tuesday 28 October 2003 10:04, Andrew Gaffney wrote:
> 
>>Is there a quicker
>>way to determine the USE flags on the fly?
> 
> portageq envvar USE

How does Portage determine USE? I assume it gets the default from 
'/etc/make.profile/make.defaults'. Does it then add any that are in '/etc/make.conf' and 
remove any that are in '/etc/make.conf' preceeded by a '-'? Is the same process then 
repeated for any USE that may be passed on the command line?

-- 
Andrew Gaffney


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gentoo-dev] how long does it take portage to parse an ebuild?
@ 2003-10-28 14:44 Andrew Gaffney
  2003-10-27 14:52 ` Stuart Herbert
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Gaffney @ 2003-10-28 14:44 UTC (permalink / raw
  To: Gentoo Dev

Is there a way to determine how long it takes 'emerge' to parse an ebuild and figure out 
what packages it is dependent on according to USE flags? I wrote a Perl program that does 
this and it takes 0.049 seconds to parse 
'/usr/portagemedia-video/mplayer/mplayer-1.0_pre2.ebuild' and tell me what the 
dependencies are with the current USE flags. I want to compare it to how fast Portage does 
this on my particular setup to get an acurate comparison.

--
Andrew Gaffney


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] how long does it take portage to parse an ebuild?
  2003-10-27 14:52 ` Stuart Herbert
@ 2003-10-28 15:04   ` Andrew Gaffney
  2003-10-27 15:13     ` Mike Frysinger
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Gaffney @ 2003-10-28 15:04 UTC (permalink / raw
  To: Gentoo Dev

Stuart Herbert wrote:
> On Tuesday 28 October 2003 2:44 pm, Andrew Gaffney wrote:
> 
>>Is there a way to determine how long it takes 'emerge' to parse an ebuild
>>and figure out what packages it is dependent on according to USE flags? I
>>wrote a Perl program that does this and it takes 0.049 seconds to parse
>>'/usr/portagemedia-video/mplayer/mplayer-1.0_pre2.ebuild' and tell me what
>>the dependencies are with the current USE flags. I want to compare it to
>>how fast Portage does this on my particular setup to get an acurate
>>comparison.
> 
> 
> How about 'time emerge -p <package>'?

While this take considerable longer than my program, it also has a lot more things to do. 
It has to parse the USE flags and determine if any of the packages mplayer depends on are 
installed or not. I was using `emerge info | grep USE` to determine the USE flags, but 
that alone took 1.5 seconds, so I switched to 'emerge info | grep USE > /tmp/emergeinfo' 
before I run the program and do `cat /tmp/emergeinfo` inside my program. Is there a 
quicker way to determine the USE flags on the fly?

upstairs root # time emerge -p =media-video/mplayer-1.0_pre2

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] media-video/mplayer-1.0_pre2


real    0m1.578s
user    0m1.487s
sys     0m0.083s

-- 
Andrew Gaffney


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] how long does it take portage to parse an ebuild?
  2003-10-27 15:13     ` Mike Frysinger
  2003-10-28  2:30       ` Andrew Gaffney
@ 2003-10-28 15:28       ` Andrew Gaffney
  2003-10-27 16:06         ` Mike Frysinger
  2003-10-27 16:08         ` Peter Ruskin
  1 sibling, 2 replies; 10+ messages in thread
From: Andrew Gaffney @ 2003-10-28 15:28 UTC (permalink / raw
  To: gentoo-dev

Mike Frysinger wrote:
> On Tuesday 28 October 2003 10:04, Andrew Gaffney wrote:
> 
>>Is there a quicker
>>way to determine the USE flags on the fly?
> 
> portageq envvar USE

That take twice as long to run as 'emerge info | grep USE'.

upstairs dev # time portageq envvar USE
x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww mpeg ncurses pdflib 
png spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang readline svga tcltk java X sdl 
gpm pam ssl perl python esd imlib oggvorbis gtk opengl mozilla cdr 3dnow dga dvd ethereal 
imap joystick moznocompose samba snmp xml -arts -kde -gnome -mad -mikmod -motif -nls 
-quicktime -ggi -mysql -tcpd -qt

real    0m2.949s
user    0m1.103s
sys     0m0.048s

-- 
Andrew Gaffney


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] how long does it take portage to parse an ebuild?
  2003-10-28  2:30       ` Andrew Gaffney
@ 2003-10-28 20:17         ` Marius Mauch
  0 siblings, 0 replies; 10+ messages in thread
From: Marius Mauch @ 2003-10-28 20:17 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

On 10/27/03  Andrew Gaffney wrote:

> Mike Frysinger wrote:
> > On Tuesday 28 October 2003 10:04, Andrew Gaffney wrote:
> > 
> >>Is there a quicker
> >>way to determine the USE flags on the fly?
> > 
> > portageq envvar USE
> 
> How does Portage determine USE? I assume it gets the default from 
> '/etc/make.profile/make.defaults'. Does it then add any that are in
> '/etc/make.conf' and remove any that are in '/etc/make.conf' preceeded
> by a '-'? Is the same process then repeated for any USE that may be
> passed on the command line?

It's a bit more complex: It's adding the USE settings from make.globals,
make.defaults, make.conf and the environment (you can specify a
different order, but I don't think anybody is using that feature). Then
it has a big list like USE="foo bla -* bar foo -bar". So it iterates
over the space delimited elements, adds all flags without - to the final
list, removes flags with - from that list (if present) and clears the
list if it finds a -* (one exception is the x86/ppc/... flag, that is
always in the list).

Marius

-- 
Public Key at http://www.genone.de/info/gpg-key.pub

In the beginning, there was nothing. And God said, 'Let there be
Light.' And there was still nothing, but you could see a bit better.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] how long does it take portage to parse an ebuild?
  2003-10-27 16:08         ` Peter Ruskin
@ 2003-10-28 23:59           ` Andrew Gaffney
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Gaffney @ 2003-10-28 23:59 UTC (permalink / raw
  To: Gentoo Dev

Peter Ruskin wrote:
> On Tuesday 28 Oct 2003 15:28, Andrew Gaffney wrote:
> 
>>That take twice as long to run as 'emerge info | grep USE'.
> 
> 
> Hmmm, not here:
> 
> # time portageq envvar USE
> x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod 
> mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib 
> berkdb slang readline arts tetex aalib svga ggi tcltk java mysql 
> postgres X sdl gpm tcpd pam libwww perl python esd imlib oggvorbis gtk 
> qt kde motif opengl mozilla cdr scanner acpi -alsa artswrappersuid doc 
> dvd faad -gdbm -gnome innodb joystick maildir mbox moznoirc moznomail 
> moznocompose nocardbus odbc ppds samba -ssl sse tiff usb wmf xvid 
> -xinerama
> 
> real    0m0.637s
> user    0m0.630s
> sys     0m0.000s
> 
> # time emerge info | grep USE
> USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad 
> mikmod mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms 
> xv zlib berkdb slang readline arts tetex aalib svga ggi tcltk java 
> mysql postgres X sdl gpm tcpd pam libwww perl python esd imlib 
> oggvorbis gtk qt kde motif opengl mozilla cdr scanner acpi -alsa 
> artswrappersuid doc dvd faad -gdbm -gnome innodb joystick maildir mbox 
> moznoirc moznomail moznocompose nocardbus odbc ppds samba -ssl sse tiff 
> usb wmf xvid -xinerama"
> 
> real    0m0.916s
> user    0m0.820s
> sys     0m0.050s

That's really weird. This morning I was getting:

upstairs dev # time portageq envvar USE
x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww mpeg ncurses pdflib 
png spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang readline svga tcltk java X sdl 
gpm pam ssl perl python esd imlib oggvorbis gtk opengl mozilla cdr 3dnow dga dvd ethereal 
imap joystick moznocompose samba snmp xml -arts -kde -gnome -mad -mikmod -motif -nls 
-quicktime -ggi -mysql -tcpd -qt

real    0m3.013s
user    0m1.116s
sys     0m0.041s

and now I'm getting:

upstairs root # time portageq envvar USE
x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww mpeg ncurses pdflib 
png spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang readline svga tcltk java X sdl 
gpm pam ssl perl python esd imlib oggvorbis gtk opengl mozilla cdr 3dnow dga dvd ethereal 
imap joystick moznocompose samba snmp xml -arts -kde -gnome -mad -mikmod -motif -nls 
-quicktime -ggi -mysql -tcpd -qt

real    0m1.151s
user    0m1.106s
sys     0m0.045s

I'm pretty sure the machine wasn't in use this morning.

-- 
Andrew Gaffney


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-10-28 20:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-28 14:44 [gentoo-dev] how long does it take portage to parse an ebuild? Andrew Gaffney
2003-10-27 14:52 ` Stuart Herbert
2003-10-28 15:04   ` Andrew Gaffney
2003-10-27 15:13     ` Mike Frysinger
2003-10-28  2:30       ` Andrew Gaffney
2003-10-28 20:17         ` Marius Mauch
2003-10-28 15:28       ` Andrew Gaffney
2003-10-27 16:06         ` Mike Frysinger
2003-10-27 16:08         ` Peter Ruskin
2003-10-28 23:59           ` Andrew Gaffney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox