[squeak-dev] MC ancestry slowness
Andreas Raab
andreas.raab at gmx.de
Sat Dec 19 14:31:03 UTC 2009
Hi -
I'm trying to make sure we can update all the way from 3.10 to 3.11 and
ran into a particular problem. It appears that the ancestry computation
of MC can be *extremely* inefficient at times. Here is the example that
I found to be the current culprit:
"find the versions involved in the problem"
workingCopy := (MCPackage named: 'Monticello') workingCopy.
info := workingCopy ancestors first.
all := MCVersionSorter new allAncestorsOf: info.
base := all detect:[:any| any name = 'Monticello-ar.323'].
root := all detect:[:any| any name = 'Monticello-ar.321'].
"this is the actual operation"
base allAncestorsOnPathTo: root.
This will basically hang - I've not found enough patience so far to wait
if it ever completes (I think it eventually will; it just appears to be
an exponential search tree depending on the number of branches).
Since there is only one current user of this operation
(MCConfiguration>>logUpdate:with:) I'm inclined to have this operation
be guarded via something like here:
[aVersion info allAncestorsOnPathTo: each]
valueWithin: 5 seconds onTimeout:[#()]
to avoid hanging in the update process.
Comments?
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|