On 07 Aug 2014, at 13:49, Benjamin <benjamin.vanryseghem.ph...@gmail.com> wrote:
> Without testing it more, I can’t tell you, > but your code seems to make sense :) +1 > > > Ben > > On 07 Aug 2014, at 13:47, Camille Teruel <camille.ter...@gmail.com> wrote: > >> Hi everyone, >> >> I noticed that browsing Object take several seconds (5s on my machine). >> Evaluate Nautilus openOnClass: Object. >> After profiling, I found it's because of >> ClassWidget>>setCachedHierarchyClass: that calls SortHierarchically >> class>>buildHierarchyForClasses: with a big collection of classes. >> But the browser opens on the package view by default, not the hierarchy view. >> So if I replace: >> >> ClassWidget>>showHierarchy: anObject >> showHierarchy := anObject. >> self selectedClass ifNotNil:[: class | >> self setCachedHierarchyClass: class] >> by: >> >> ClassWidget>>showHierarchy: aBoolean >> (showHierarchy := aBoolean) >> ifTrue: [ self selectedClass ifNotNil: [ :class | self >> setCachedHierarchyClass: class] ] >> >> it solves the problem. >> But I don't know that part of the system well and I don't know if it's the >> correct thing to do or if we should try to improve performances of >> SortHierarchically instead. >> So tell me what you think about it. >> Here is the bug entry: >> https://pharo.fogbugz.com/f/cases/13795/Browsing-certain-classes-takes-several-seconds >> >> >> Thanks, >> Camille >