PackageInfoTweak

Download

  • Repository: OBPackageBrowser
  • Location: http://www.squeaksource.com/OBPackageBrowser

Current issues

  • after loading a new version using MC, it can happen that the cache is not completely valid any more (due heavy dependence on system notifications), refresh using:
    • PackageExtensionOrganizer reinitialize
    • PackageClassOrganizer reinitialize

Performance

items in the configuration   new/enhanced version   old version (same without cache)   ??? x faster  
classes 877 18.1 ms 2779.6 ms 150
method categories 4637 578 ms 13710 ms 25
methods 19591 4307 ms 142067 ms 30

Code

 classes := Smalltalk allClasses 
	select: [ :class | 
		('\*kernel\*' match: class category)
		or: [ '\*collection\*' match: class category ]
		or: [ '\*morphic\*' match: class category ] ].
 block := [ classes collect: [ :class | PackageOrganizer default packageOfClass: class ] ].
 ((1 to: 20) collect: [ :i | MessageTally time: block ] ) average asFloat.
 block := [ mcats collect: [ : a | PackageOrganizer default packageOfMethodCategory: a value in: a key ] ].
 mcats := classes gather: [ :class | class organization categories collect: [ :cat | class -> cat] ].
 ((1 to: 10) collect: [ :i | MessageTally time: block ] ) average asFloat
 methods := classes gather: [ :class | class selectors collect: [ : sel | MethodReference class: class selector: sel ] ].
 block := [ methods collect: [ :mref | PackageOrganizer default packageOfMethod: mref ] ].
 ((1 to: 10) collect: [ :i | MessageTally time: block ] ) average asFloat
Last changed by admin on 21 April 2009