Breaking up the image

Daniel Vainsencher danielv at netvision.net.il
Tue Dec 10 16:41:40 UTC 2002


I'm offering a theory:
1. We have a big image because it has explicit references from basic
core classes to things that should be packages.
2. The references were put there by well meaning people, because it is
useful for the core class to know the package class.
3. Some few specific classes hold most of the bad references, because
they are useful entry points for linking in functionality.
4. To make the image smaller, we need to find those core classes that
know everybody, and break them up, refactor them, or make their
utilities into class-extensions, until their bad links are no longer
binding all those classes into the image. An example is the dynamic file
list services refactoring that's already happened in 3.3a/3.4.

Call this Bottom-Up theory of squeak spaghetti, as opposed to the
Top-Down theory, that says we should remove applications whole one by
one.

So I did some SpaghettiTracer magic, and got the following results.

Here's a list of classes that know too much (Specifically, too many
other classes). This list excludes high level objects that should
probably be removed from the image quite early. Any insights on why
these classes know so much, and how to fix it would be most welcome.

# of referenced classes -> #ClassNames
 127-> #Morph
 107-> #SystemDictionary
 85-> #PasteUpMorph
 77-> #Project
 73-> #Utilities
 63-> #Object
 55-> #ParagraphEditor
 50-> #ImageSegment #TheWorldMenu
 46-> #BookMorph
 44-> #FileList #ChangeList
 41-> #Preferences
 40-> #Form #ServerDirectory #SmartRefStream #ChangeSet
 39-> #Browser
 37-> #CodeHolder
 36-> #String #ChangeSorter #Debugger
 34-> #FileContentsBrowser
 33-> #FileList2
 32-> #AbstractSound 
 31-> #Behavior 
 30-> #SystemWindow
 29-> #MailMessage
 28-> #TextMorph #Flaps


Full list (cutoff at 6 references, since that's meaningless)


 127-> #Morph
 107-> #SystemDictionary
 85-> #PasteUpMorph
 77-> #Project
 73-> #Utilities
 67-> #SyntaxMorph
 66-> #Player
 63-> #Object
 55-> #ParagraphEditor
 50-> #ImageSegment #TheWorldMenu
 49-> #Celeste
 46-> #WonderlandCameraMorph #BookMorph
 45-> #WonderlandActor
 44-> #FileList #ChangeList
 41-> #Preferences
 40-> #Form #ServerDirectory #SmartRefStream #ChangeSet
 39-> #Browser #Wonderland
 37-> #ScriptEditorMorph #CodeHolder
 36-> #String #ChangeSorter #Scamper #Debugger
 35-> #ScorePlayerMorph #Vocabulary #Lexicon
 34-> #FileContentsBrowser
 33-> #FlashMorphReader #FileList2
 32-> #AbstractSound #ProcessBrowser
 31-> #Behavior #StandardScriptingSystem
 30-> #CategoryViewer #SystemWindow
 29-> #EnvelopeEditorMorph #MailMessage #SuperSwikiServer
 28-> #TextMorph #Flaps #ArchiveViewer #AudioChatGUI
 27-> #MoviePlayerMorph #TileMorph #HTTPSocket #ClassDescription
#StringHolder #ProjectViewMorph #Inspector
 26-> #IRCConnection
 25-> #InterpreterSimulator #EToySenderMorph #Parser #DataStream
#EventRecorderMorph #DocLibrary #HandMorph #Presenter
 24-> #InternalThreadNavigationMorph #ScreenController #ProjectLoading
#ProjectNavigationMorph #NetworkTerminalMorph
 23-> #WaveEditor #SelectorBrowser #PluggableFileList #CRDictionary
 22-> #StackMorph #PaintBoxMorph #FlashPlayerMorph #CRDictionaryBrowser
#MethodFinder #MailDB #StandardViewer #ResourceManager #PreferencesPanel
#SketchMorph
 21-> #StandardFileStream #WorldState #Color
 20-> #PolygonMorph #FlapTab #CCodeGenerator #Text
#ComplexProgressIndicator #HaloMorph
 19-> #FlashFileReader #StandardSystemView #CompiledMethod
#FileDirectory #Environment #Integer #InterpreterProxy #MessageSet
 18-> #StrikeFont #MenuMorph #DigitalSignatureAlgorithm #ContextPart
#EToyCommunicatorMorph #Collection #FileStream #RunArray
#TextMorphEditor #FormEditor
 17-> #ThreeDSParser #Encoder #PositionableStream #EToyChatMorph
#CanvasDecoder #Pen #StarSqueakMorph #TMethod #SketchEditorMorph
 16-> #CRDictionaryMorph #SecurityManager #ScriptInstantiation
#EToyListenerMorph #SampledSound #SimpleButtonMorph #BitBlt #HTTPClient
#FreeCell #TabbedPalette #PostscriptCanvas #CelesteComposition
 15-> #SimpleClientSocket #VRMLStream #ZipWriteStream #ButtonProperties
#StringMorph #SelectionMorph #JPEGReadWriter #MIDIFileReader
#CRDisplayPropertiesInstanceBrowser #BitEditor #PseudoClass
#SequenceableCollection #HtmlFormatter #CanvasEncoder #CRRecognizer
#Class #Number #GenericPropertiesMorph
 14-> #PluggableListMorph #URLMorph #Viewer #EToyMultiChatMorph
#NewParagraph #BalloonEngine #ResourceCollector #PopUpMenu
#GraphicalDictionaryMenu #SyntaxError #WonderlandCamera
#EToyIncomingMessage #PluggableTextMorph #StringSocket #MessageTally
#Paragraph #ReferenceMorph #BDFFontReader #ZipArchiveMember
#CRAddFeatureMorph #EToyFridgeMorph #TextPlusMorph
 13-> #ColorPickerMorph #TestTMethod #MenuItemMorph
#DecompilerConstructor #B3DRenderEngine #PianoRollScoreMorph #SqueakPage
#PhraseTileMorph #WordNet #CRDisplayPropertiesMorph #UpdatingStringMorph
#FlashCodec #ClassBuilder #ProjectSorterMorph #Preference
#TextPropertiesMorph #MessageNames #Socket #ChatNotes
 12-> #ControlManager #CRStrokeFeature #NebraskaServerMorph
#EToyVocabulary #B3DIndexedMesh #FancyCelesteComposition #IconicButton
#CardPlayer #SimpleHierarchicalListMorph #ThreadNavigationMorph #HttpUrl
#EToyProjectHistoryMorph #ScorePlayer #TCaseStmtNode #Dictionary
#FormCanvas #EToyPeerToPeer #IndexFile #BookPageThumbnailMorph
#TabSorterMorph #Url #WonderlandMesh #DialectParser #TextOnCurve
#Base64MimeConverter #FMSound #ReferenceStream #FatBitsPaint
#SystemVersion #SmallInteger #LineIntersections #ParseNode
 11-> #StandardFileMenu #SampledInstrument #LoopedSampledSound
#ColorForm #InputSensor #Transcripter #AutoStart #Interpreter
#FreeCellBoard #B3DHardwareEngine #B3DSimpleMesh #B3DSimulRasterizer
#ScrollBar #Rectangle #HTTPLoader #ObjectPropertiesMorph
#TextDiffBuilder #PlayingCard #PointerFinder #PoohSubdivision
#CompoundTileMorph #GeePrinter #MorphWorldView #MessageNode #FilePackage
#SoundPlayer #B3DPrimitiveRasterizer #FillInTheBlankMorph
#BitBltSimulation #Array #BlockContext #PackagePaneBrowser
#PluggableCollectionMorph #ObjectsTool #WonderlandLightSource
#AlignmentMorph
 10-> #GraphMorph #VariableNode #SearchingViewer #SoundRecorder
#RemoteHandMorph #BalloonCanvas #HtmlParser #ImageMorph
#ClassCommentVersionsBrowser #Symbol #FileUrl #StringHolderView
#StandardSystemController #PluggableButtonView #B3DSTriangleMesh
#FormMenuView #FreeTranslation #MorphicModel #AllScriptsTool
#MessageSend #NetNameResolver #Date #View #HtmlEntity #NebraskaServer
#BouncingAtomsMorph #Time #EToyProjectRenamerMorph #MorphicEvent #Canvas
#ComponentLikeModel #VersionsBrowser
 9-> #MorphicTransform #NumericReadoutTile #HtmlTokenizer #GIFReadWriter
#PoohTriangle #ZipArchive #PinMorph #ImageReadWriter
#PortugueseLexiconServer #IndexFileEntry #Bitmap #TilePadMorph #Model
#Command #B3DScanner #ExternalDropHandler #POPSocket #TimeProfileBrowser
#WarpBlt #FillInTheBlankView #CharRecog #TranscriptStream
#NebraskaClient #FTPSocket #SoundBuffer #WonderlandScene #DisplayScreen
#BMPReadWriter #BorderedMorph #WonderlandWrapperMorph
#AlansTextPlusMorph #SpeakerMorph #FlashSorterMorph
 8-> #PartsBin #ThreePhaseButtonMorph #KeyboardMorphForInput
#DisplayScanner #FlashButtonMorph #IRCDirectMessagesObserver
#StringButtonMorph #TextPlusPasteUpMorph #AIFFFileReader
#UndefinedObject #DisplayText #ProgressInitiationException
#PluggableListView #InterpreterPlugin #MovieClipStartMorph #Compiler
#UniclassScript #EToySystem #BooklikeMorph #SecureHashAlgorithm
#ScrollController #DHtmlFormatter #MethodInterface #GradientFillStyle
#Scanner #B3DMatrix4x4 #SARInstaller #EToyGenericDialogMorph #BraceNode
#Component #GZipSurrogateStream #BalloonMorph #ScrollPane
#ButtonPropertiesMorph #B3DIndexedTriangleMesh #GZipReadStream
#TestCodeGenerator #SystemOrganizer #MIMEDocument #ClassOrganizer
#ProjectHistory #TextStyle #StrokeSimplifier #DiskProxy #CrLfFileStream
#RemoteString #GraphAnalyzer #BookPageSorterMorph #MethodNode
#OrderedCollection #BorderStyle #WonderlandVerifier #DisplayObject
 7-> #CustomMenu #PlayingCardDeck #CRDictionaryInstanceBrowser
#ThumbnailMorph #GeePrinterDialogMorph #ListView #EToyGateKeeperEntry
#FlashSpriteMorph #WeakRegistry #ShortRunArray #MethodHolder
#DictionaryInspector #ObjectExplorer #IRCChannelListBrowser
#StarSqueakTrees #ProtocolBrowser #ClassDiffBuilder #B3DIndexedQuadMesh
#ComplexBorder #DoCommandOnceMorph #Point #AttributedTextStream
#ListParagraph #MIDIControllerMorph #Password #Subdivision
#AlignmentMorphBob1 #IndentingListItemMorph #FlashMorph #RemoteCanvas
#DialectStream #TextContainer #NumberType #PluggableButtonMorph
#SqueakPageCache #FreeCellStatistics #NewWorldWindow #TextURL
#TextPrinter #SoundCodec #PianoKeyboardMorph #MailAddressParser
#TextFieldMorph #SimpleSliderMorph #ChangeSetCategory #MethodContext
#InflateStream #FFT #IRCChannelObserver #ChangeRecord
#ObjectWithDocumentation #Decompiler #Metaclass #PlayingCardMorph
#ReadWriteStream #BasicButton #FlashFileStream #TextComposer



More information about the Squeak-dev mailing list