[FIX]Re: Collection refactoring
Karl Ramberg
karl.ramberg at chello.se
Wed May 17 17:36:32 UTC 2000
Here is one less method :-)
This method had 0 senders.
Karl
What do one call this ? A fix or enh or what ?
Stefan Matthias Aust wrote:
> At 17:38 13.05.00 -0400, Hannes Hirzel wrote:
> >Congratulations to Stefan-Matthias that you start refactoring. It's really
> >needed.
>
> Thanks. Anybody out there, who wants to join the effort? The class
> String is a good candidate. Then there's the Stream hierarchy. And
> Prefernces, ugh.
>
> And there're too many classes with too many methods overall:
>
> class methods comments
> Interpreter 542 special, don't really care
> Morph 512 shame on you
> BalloonEngineBase 273 still too big
> Player 269 not better
> PasteUpMorph 265 it's always morphic
> WonderlandActor 253 ditto
> Preferences class 235 messy
> Object 235 here's the first core class
> ParagraphEditor 231 it does alot but that's no excuse
> HandMorph 228 no comment
>
> Use
>
> (Object withAllSubclasses
> collect: [:e | e -> e selectors size])
> asSortedCollection: [:a :b | b value < a value]
>
> to get the complete list.
>
> And while I was compiling a few metrics, he're the 10 largest methods
> (counting byte codes):
>
> (class selector) -> (bytecode size. source size. # of CR)
>
> ('Utilities class' #vmStatisticsReportString )->(1169 4144 82 )
> (#JPEGReadWriter #idctBlockInt:component: )->(1082 4185 111 )
> (#KlattSynthesizerPlugin #setCurrentFrame: )->(1064 3778 64 )
> (#BitBltSimulation #xWarpLoop )->(985 6271 149 )
> (#PaintBoxMorph #init3 )->(942 3047 75 )
> (#Interpreter #primitiveStoreImageSegment )->(914 9756 184 )
> ('LipsMorph class' #initialize )->(907 1641 39 )
> (#Wonderland #makeActorFrom: )->(893 4955 140 )
> ('HTTPSocket class' #httpPostMultipart:args:accept:request: )->(880 3762 89 )
> (#AliceWorld #makeActorFrom: )->(879 4886 139 )
>
> Looking that the number of lines (I know that's a lousy metric)
>
> # methods threshold [loc]
> 64 >100
> 343 >50
> 1587 >25
> 5799 >10
> 10964 >5
> 5174 <2
> 77 <1
>
> of 27530 methods in an 2.8a2096 image including a few other projects.
>
> My image contains 1.5 MB bytecode and ~9 MB source code with 235888 loc.
>
> bye
-------------- next part --------------
'From Squeak2.8alpha of 19 February 2000 [latest update: #2158] on 17 May 2000 at 7:34:35 pm'!
SystemWindow removeSelector: #activeOnlyOnTop:!
More information about the Squeak-dev
mailing list
|