Skip to main content

[pkg-discuss] Re: [review] pkg contents -t performance improvement

  • From: Bart Smaalders < >
  • To:
  • Subject: [pkg-discuss] Re: [review] pkg contents -t performance improvement
  • Date: Thu, 06 Jun 2013 11:28:05 -0700
  • Organization: Oracle

On 06/05/13 18:37, Shawn Walker wrote:
Greetings,

The following webrev contains improvements for the performance of pkg
contents when using -t:

   16916660 pkg contents -t performance could be improved

webrev:
   https://ips.java.net/webrev/srwalker/pkg-contents-1/

~87% reduction in execution time and ~83% reduction in peak memory usage.

======
Before
======
root@darwin-sunw:~# ptime pkg -R / contents -t driver -a name=ehci -o
name,pkg.fmri
NAME PKG.FMRI
ehci pkg://solaris/system/io/usb@5.12,5.11-5.12.0.0.0.19.0:20130408T143110Z

real        6.723716684
user        6.367241293
sys         0.353306540

root@darwin-sunw:~# ptime pkg -R / contents -t driver -o name,pkg.fmri |
wc -l

real        6.854164409
user        6.467394150
sys         0.383442701
      302
root@darwin-sunw:~#

Peak memory usage (pmap -x total): 247,764Kb

=====
After
=====
$ ptime pkg -R / contents -t driver -a name=ehci -o name,pkg.fmri
NAME PKG.FMRI
ehci pkg://solaris/system/io/usb@5.12,5.11-5.12.0.0.0.19.0:20130408T143110Z

real        0.844223268
user        0.729162817
sys         0.112306825

$ ptime pkg -R / contents -t driver -o name,pkg.fmri | wc -l

real        0.880399134
user        0.751597866
sys         0.125324707
      302

Peak memory usage (pmap -x total): 42,036Kb

-Shawn

With the additional comments regarding the use of the
generator expression, this looks great to me.  Nice
find.

- Bart


--
Bart Smaalders                  Solaris Core OS

  http://blogs.oracle.com/barts
"You will contribute more with Mercurial than with Thunderbird."
"Civilization advances by extending the number of important
 operations which we can perform without thinking about them."


[pkg-discuss] [review] pkg contents -t performance improvement

Shawn Walker 06/06/2013

[pkg-discuss] Re: [review] pkg contents -t performance improvement

Bart Smaalders 06/06/2013
 
 
Close
loading
Please Confirm
Close