On 02/12/2012 06:50, Kimmo Paasiala wrote:
> It takes about half an hour on my dog slow intel atom D510. Is there
> anything in the works to speed up 'make index'? I understand that the
> slowest part is the evaluation of dependencies, is that right?

The slow part is parsing around 25,000 Makefiles ( + reading about 25000
pkg-descr files, but that's relatively quick) in order to extract the
values of certain variables.   make(1) typically takes about 200ms per
Makefile, which is ages.  Speedups are possible: parallelization (which
is what make index does) or cacheing the results and only rerunning make
when changes could affect the output (which is what FreeBSD::Portindex does)

Once you've done all that Makefile processing, chasing all the
dependencies is fairly quick.

A great deal of time and effort has been spent on making 'make index'
run as fast as possible.  All the easy optimizations and many of the
not-so-easy ones have already been applied.  Further improvement would
probably require a radical 'throw it away and write something better
from scratch' approach, which I'm not at all sure is worth it since for
the most part, the ports works just fine without any sort of index at
all, and it is the various websites that essentially show nicely
formatted data from the INDEX that would really benefit.

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matt...@infracaninophile.co.uk

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to