Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

The Grand Perspective on CPAN

by bruno (Friar)
on Feb 23, 2009 at 10:25 UTC ( [id://745734]=perlnews: print w/replies, xml ) Need Help??

Not that I'd like this to turn into Reddit, but I thought that this is relevant (yet off-beat) enough to be posted in this section.

From the author's page:

GrandPerspective is a small utility application for Mac OS X that graphically shows the disk usage within a file system. It can help you to manage your disk, as you can easily spot which files and folders take up the most space. It uses a so called tree map for visualization. Each file is shown as a rectangle with an area proportional to the file's size. Files in the same folder appear together, but their placement is otherwise arbitrary.

Mandatory link

Wouldn't it be nice to have this graph fully annotated? It could show the module name and author as a tooltip when hovering over a certain area. I'd certainly like to know where some of those big squares are from.

Replies are listed 'Best First'.
Re: The Grand Perspective on CPAN
by $self (Friar) on Feb 23, 2009 at 11:54 UTC
    Yes, would be nice to see a fully annotated one... WinDirStat and Sequoiaview are two free windows programs that do a similar job as GrandPerspective. For linux there's KDirStat (or du -k | sort -nr :)
      For the Gnome users, there's Baobab.
Re: The Grand Perspective on CPAN
by ambrus (Abbot) on Feb 25, 2009 at 20:23 UTC

    Try the following commands to get (an approximation of) the largest files and directories in CPAN.

    rsync -rvz cpan.pair.com::CPAN/ > list perl -e 'use strict; use warnings; my %h; while(<>){ chomp; /^\S{10}/ +or next; my $n = substr $_,43; substr($_,11) =~ /^\s*(\d+)/ or die; m +y $s = $1; while ($n =~ m"/|$"g) { my $p = $`; $p =~ m"authors/id/.(? +:/..)?$" and next; $h{$p} += $s; } } warn 0+keys(%h); for my $n (reve +rse+(sort { $h{$b} <=> $h{$a} } keys%h)[0..9999]) { printf "%10.0f %s +\n", $h{$n}, $n; }' list > sizes

    The first command downloads the full directory listing (not the files) from a CPAN mirror server, this is about 33 megabytes uncompressed currently. The second lists the 10_000 largest files and directories (omitting some uninteresting ones) from this to the file sizes.

    It turns out that the author with the largest total file size is NWCLARK with 224 megs of files, then GRAHAMC, RGARCIA, TPEDERSE in this order. The largest single file is authors/id/G/GR/GRAHAMC/SiePerl-5.8.8-bin-1.0-Win32.INSTALL.exe, 34 megabytes large.

    Here's a copy of the last few lines of output.

    Update: I have posted the generalization of this code to rsyncsize -- Largest directories on a remote file system.

    Update 2011-12-17: CPAN - As Seen From Space!

      Looks like some people need to be made aware of backpan, and cull their folders :-P

      It also seems kind of odd to store the perl source in pumpkings' folders...

      --
      In Bob We Trust, All Others Bring Data.

Re: The Grand Perspective on CPAN
by ambrus (Abbot) on Feb 25, 2009 at 19:43 UTC

    I just use du -ax path | sort -n

Re: The Grand Perspective on CPAN
by pemungkah (Priest) on Feb 24, 2009 at 20:15 UTC
    Disk Inventory X does do the floating tooltip biz, as well as letting you delete stuff, updating the map afterwards. One could use CPAN::Mini and then run one of these on after the local repository was created. Might be quite interesting.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlnews [id://745734]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-25 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found