Doru wrote:
@Stephan, Diego: Would you like to look into this? This should get in the 4.8 release.
New versions of Morphic & Kernel, and Fame-ImportExport
Giving Job its own jobAnnouncer (and using that in SystemProgressMorph) helps a bit, but not enough.
Job>>jobAnnouncer ^jobAnnouncer ifNil: [ jobAnnouncer := Announcer new ]
Job>announce: anAnnouncementClass | announcement | announcement := anAnnouncementClass on: self. self announcer announce: announcement.
Job>announcer ^Job jobAnnouncer
SystemProgressMorph>>enable Job jobAnnouncer on: JobStart send: #startJob: to: self. Job jobAnnouncer on: JobEnd send: #endJob: to: self. Job jobAnnouncer on: JobChange send: #updateJob: to: self.
SystemProgressMorph>>disable Job jobAnnouncer unsubscribe: self.
- 25606 tallies, 25644 msec.
**Tree** -------------------------------- Process: (40s) Morphic UI process: nil -------------------------------- 79.3% {20336ms} MooseModel class>>importFrom: 79.3% {20336ms} MooseModel class>>importFrom:withMetamodel: 79.3% {20328ms} MSEImporter(FMImporter)>>run 79.3% {20328ms} FMMSEParser>>run 79.2% {20322ms} FMMSEParser>>basicRun 79.2% {20322ms} FMMSEParser>>Document 78.2% {20066ms} FMMSEParser>>Element 50.0% {12834ms} FMMSEParser>>Attribute |24.3% {6239ms} MSEImporter(FMImporter)>>endAttribute: | |24.3% {6228ms} FMFutureElement>>endAttribute: | | 24.2% {6212ms} FMFutureAttribute>>endAttribute: | | 21.6% {5541ms} FMFutureAttribute>>maybeEnd | | |13.3% {3404ms} FM3MetaDescription>>attributeNamed:ifAbsent: | | | |8.1% {2078ms} FM3MetaDescription>>attributeNamed:ifAbsent: | | | | |3.9% {1010ms} FM3MetaDescription>>attributeNamed:ifAbsent: | | | | | |2.8% {730ms} FM3MetaDescription>>attributeNamed:ifAbsent: | | | | |1.8% {461ms} FMMultivalueLink(Collection)>>detect:ifNone: | | | | | |1.7% {434ms} FMMultivalueLink>>do: | | | | | | 1.7% {430ms} OrderedCollection>>do: | | | | |1.5% {396ms} ByteString(String)>>= | | | | | 1.5% {390ms} primitives | | | |2.6% {661ms} FMMultivalueLink(Collection)>>detect:ifNone: | | | | |2.1% {549ms} FMMultivalueLink>>do: | | | | | 2.0% {508ms} OrderedCollection>>do: | | | |1.7% {438ms} ByteString(String)>>= | | | | 1.7% {430ms} primitives | | |7.1% {1819ms} FM3PropertyDescription>>setOn:values: | | | 6.4% {1629ms} FAMIXParameterType(Object)>>mmSetProperty:to: | | | 6.2% {1597ms} FM3PropertyDescription>>setOn:rawValue: | | | 2.0% {525ms} ByteSymbol(Symbol)>>asMutator | | | 1.9% {493ms} ByteString(String)>>asSymbol | | | 1.5% {387ms} Symbol class>>intern: | | | 1.5% {376ms} Symbol class>>lookup: | | | 1.4% {367ms} WeakSet>>like: | | | 1.4% {361ms} WeakSet>>scanFor: | | 2.4% {620ms} PhexMatcher>>= | | 1.1% {287ms} PhexMatcher>>expect:using: |12.2% {3127ms} FMMSEParser>>Value | |5.7% {1459ms} FMMSEParser>>Primitive | | |4.4% {1141ms} FMMSEParser>>Number | | | 1.2% {309ms} WriteStream>>reset | |4.9% {1259ms} FMMSEParser>>Reference | | 2.7% {705ms} FMMSEParser>>Identifier |5.8% {1490ms} FMMSEParser>>tNAME | |2.4% {608ms} Character>>isAlphaNumeric | | |1.9% {482ms} Character>>isLetter | | | 1.2% {305ms} Character>>characterSet | |1.3% {327ms} FMMSEParser>>next | | 1.1% {279ms} MultiByteFileStream>>next |4.6% {1168ms} MSEImporter(FMImporter)>>beginAttribute: | |4.4% {1124ms} FMFutureElement>>beginAttribute: | | 3.6% {912ms} PhexMatcher>>beTrue | | 3.4% {874ms} PhexMatcher>>true | | 3.0% {758ms} PhexMatcher>>expectedUnknownMessageToReturn: | | 1.7% {449ms} Array(Collection)>>copyWithout: | | |1.7% {437ms} Array(Collection)>>reject: | | 1.0% {261ms} PhexMatcher>>expect:describeShould:describeShouldNot: |1.1% {290ms} FMMSEParser>>tOPEN 20.4% {5239ms} FMMSEParser>>increment |20.4% {5239ms} Job>>value: | 20.4% {5231ms} Job>>currentValue: | 20.4% {5231ms} Job>>announceChange | 20.4% {5231ms} Job>>announce: | 20.4% {5221ms} Announcer>>announce: | 20.3% {5211ms} SubscriptionRegistry>>deliver: | 19.2% {4931ms} SubscriptionRegistry>>deliver:to: | 19.1% {4896ms} SubscriptionRegistry>>deliver:to:startingAt: | 19.0% {4878ms} AnnouncementSubscription>>deliver: | 18.7% {4794ms} MessageSend>>cull:cull: | 18.1% {4652ms} MessageSend>>cull: | 17.6% {4510ms} MessageSend>>value: | 17.6% {4510ms} MessageSend>>valueWithArguments: | 17.0% {4362ms} SystemProgressMorph class>>updateJob: | 11.8% {3035ms} JobProgressMorph>>progress: | |10.0% {2558ms} JobProgressBarMorph>>progress: | | 9.6% {2465ms} ProgressBarMorph>>value: | | 9.6% {2463ms} ProgressBarMorph(Morph)>>changed | | 9.6% {2452ms} ProgressBarMorph(Morph)>>invalidRect: | | 9.5% {2444ms} ProgressBarMorph(Morph)>>invalidRect:from: | | 9.5% {2440ms} JobProgressBarMorph(Morph)>>invalidRect:from: | | 9.4% {2418ms} JobProgressMorph(Morph)>>invalidRect:from: | | 9.4% {2406ms} SystemProgressMorph(Morph)>>invalidRect:from: | | 9.3% {2390ms} PasteUpMorph>>invalidRect:from: | | 8.5% {2167ms} Rectangle>>intersect:ifNone: | | 4.3% {1110ms} Rectangle>>intersects: | | |2.5% {633ms} SmallInteger>><= | | | |2.3% {580ms} SmallInteger(Integer)>><= | | | | 2.2% {573ms} Float>>adaptToInteger:andCompare: | | | | 2.1% {548ms} Float>>asTrueFraction | | | | 1.1% {275ms} SmallInteger>>bitShift: | | |1.8% {473ms} SmallInteger>>>= | | | 1.6% {403ms} SmallInteger(Integer)>>>= | | | 1.6% {401ms} Float>>adaptToInteger:andCompare: | | | 1.6% {399ms} Float>>asTrueFraction | | 2.1% {537ms} SmallInteger>>> | | |1.8% {458ms} SmallInteger(Integer)>>> | | | 1.8% {454ms} Float>>adaptToInteger:andCompare: | | | 1.7% {426ms} Float>>asTrueFraction | | 1.7% {427ms} SmallInteger>>< | | 1.4% {348ms} SmallInteger(Integer)>>< | | 1.4% {348ms} Float>>adaptToInteger:andCompare: | | 1.3% {340ms} Float>>asTrueFraction | 4.4% {1140ms} JobProgressMorph>>label: | 4.3% {1106ms} JobProgressMorph(Object)>>changed: | 3.8% {982ms} SystemProgressMorph>>update: | 3.4% {868ms} SystemProgressMorph>>updateWidth | 3.4% {860ms} SystemProgressMorph>>resize | 2.9% {749ms} SystemProgressMorph>>maxBarWidth | 2.7% {684ms} JobProgressMorph(Morph)>>minExtent | 1.4% {355ms} JobProgressMorph(Morph)>>layoutBounds | 1.2% {297ms} JobProgressMorph(Morph)>>innerBounds 3.1% {800ms} MSEImporter(FMImporter)>>beginElement: |3.0% {760ms} FMFutureElement class>>with:name: | 2.9% {756ms} FMFutureElement>>with:name: | 2.4% {615ms} FM3MetaDescription>>createInstance | 2.2% {576ms} FAMIXPackage class(Behavior)>>new 2.4% {620ms} FMMSEParser>>tFULLNAME 1.3% {324ms} FMMSEParser>>Serial **Leaves** 5.7% {1458ms} OrderedCollection>>do: 5.2% {1332ms} ByteString(String)>>= 2.8% {709ms} FMMSEParser>>tOPEN 2.7% {682ms} SmallInteger(Number)>>negative 2.6% {673ms} Array(SequenceableCollection)>>at:ifAbsent: 2.4% {624ms} False(ProtoObject)>>~~ 2.2% {561ms} SmallInteger>>bitShift: 2.1% {549ms} FAMIXClass(Object)>>= 1.7% {424ms} MultiByteFileStream(StandardFileStream)>>basicNext 1.6% {405ms} WriteStream>>reset 1.4% {349ms} FMMSEParser>>tWHITESPACE 1.2% {319ms} WriteStream>>nextPut: 1.2% {307ms} MultiByteFileStream>>next 1.1% {278ms} ByteString class(String class)>>new: 1.0% {265ms} LargePositiveInteger(Integer)>>lowBit
**Memory** old +42,243,932 bytes young -642,456 bytes used +41,601,476 bytes free +1,138,424 bytes
**GCs** full 2 totalling 1,491ms (6.0% uptime), avg 746.0ms incr 1693 totalling 3,551ms (14.0% uptime), avg 2.0ms tenures 734 (avg 2 GCs/tenure) root table 0 overflows
FMMEParser>increment is called 105538 times. Changing the parser to only update every 100 increments brings the overhead to 1.7 %
FMMSEParser>increment progBar ifNotNil: [ (increments % 100) = 0 ifTrue: [progBar value: self pos]. increments := increments+1]
FMMSEParser>run increments := 0. UIManager default displayProgress: 'Parsing ', self stream localName at: Sensor cursorPoint from: 1 to: self stream size during: [ :bar | progBar := bar. self basicRun]. - 18965 tallies, 18975 msec.
**Tree** -------------------------------- Process: (40s) Morphic UI process: nil -------------------------------- 73.3% {13901ms} MooseModel class>>importFrom: 73.3% {13901ms} MooseModel class>>importFrom:withMetamodel: 73.2% {13897ms} MSEImporter(FMImporter)>>run 73.2% {13895ms} FMMSEParser>>run 73.0% {13843ms} FMMSEParser>>basicRun 73.0% {13843ms} FMMSEParser>>Document 71.7% {13612ms} FMMSEParser>>Element |61.5% {11669ms} FMMSEParser>>Attribute | |31.4% {5963ms} MSEImporter(FMImporter)>>endAttribute: | | |31.2% {5925ms} FMFutureElement>>endAttribute: | | | 31.2% {5923ms} FMFutureAttribute>>endAttribute: | | | 27.8% {5270ms} FMFutureAttribute>>maybeEnd | | | |17.5% {3329ms} FM3MetaDescription>>attributeNamed:ifAbsent: | | | | |11.0% {2091ms} FM3MetaDescription>>attributeNamed:ifAbsent: | | | | | |4.8% {905ms} FM3MetaDescription>>attributeNamed:ifAbsent: | | | | | | |3.5% {671ms} FM3MetaDescription>>attributeNamed:ifAbsent: | | | | | | | 1.1% {216ms} FMMultivalueLink(Collection)>>detect:ifNone: | | | | | | | |1.1% {204ms} FMMultivalueLink>>do: | | | | | | | | 1.0% {197ms} OrderedCollection>>do: | | | | | | | 1.1% {205ms} ByteString(String)>>= | | | | | | | |1.0% {195ms} primitives | | | | | | | 1.0% {194ms} FM3MetaDescription>>attributeNamed:ifAbsent: | | | | | |2.6% {492ms} FMMultivalueLink(Collection)>>detect:ifNone: | | | | | | |2.5% {467ms} FMMultivalueLink>>do: | | | | | | | 2.4% {450ms} OrderedCollection>>do: | | | | | |2.4% {451ms} ByteString(String)>>= | | | | | | |2.2% {421ms} primitives | | | | | |1.1% {216ms} ByteSymbol(Symbol)>>asString | | | | |2.9% {552ms} FMMultivalueLink(Collection)>>detect:ifNone: | | | | | |2.5% {480ms} FMMultivalueLink>>do: | | | | | | 2.3% {440ms} OrderedCollection>>do: | | | | |2.4% {460ms} ByteString(String)>>= | | | | | 2.3% {441ms} primitives | | | |8.7% {1647ms} FM3PropertyDescription>>setOn:values: | | | | |7.8% {1478ms} FAMIXParameterizedType(Object)>>mmSetProperty:to: | | | | | 7.7% {1464ms} FM3PropertyDescription>>setOn:rawValue: | | | | | 2.4% {457ms} ByteSymbol(Symbol)>>asMutator | | | | | |2.3% {429ms} ByteString(String)>>asSymbol | | | | | | 1.8% {349ms} Symbol class>>intern: | | | | | | 1.8% {349ms} Symbol class>>lookup: | | | | | | 1.8% {349ms} WeakSet>>like: | | | | | | 1.8% {347ms} WeakSet>>scanFor: | | | | | 1.3% {245ms} FAMIXMethod(FAMIXBehaviouralEntity)>>declaredType: | | | | | 1.3% {241ms} FMMultivalueLink class>>on:update:from:to: | | | | | 1.3% {241ms} FMMultivalueLink>>unsafeAdd: | | | | | 1.2% {237ms} OrderedCollection(SequenceableCollection)>>includes: | | | | | 1.2% {237ms} OrderedCollection(SequenceableCollection)>>indexOf: | | | | | 1.2% {237ms} OrderedCollection(SequenceableCollection)>>indexOf:ifAbsent: | | | | | 1.2% {233ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: | | | | | 1.1% {218ms} FAMIXMethod(Object)>>= | | | |1.1% {218ms} FAMIXClass(MooseEntity)>>handleFameProperty:value: | | | | 1.1% {200ms} FAMIXClass(MooseEntity)>>propertyNamed:put: | | | | 1.0% {198ms} MooseDefaultState>>propertyAt:put: | | | 3.2% {598ms} PhexMatcher>>= | | | 1.6% {312ms} PhexMatcher>>expect:using: | |13.8% {2611ms} FMMSEParser>>Value | | |6.8% {1293ms} FMMSEParser>>Primitive | | | |5.3% {1005ms} FMMSEParser>>Number | | | | 1.3% {256ms} WriteStream>>reset | | | | 1.2% {231ms} FMMSEParser>>backtrack: | | | | 1.2% {224ms} Character>>isDigit | | |5.3% {998ms} FMMSEParser>>Reference | | | 2.9% {556ms} FMMSEParser>>Identifier | |7.5% {1430ms} FMMSEParser>>tNAME | | |3.1% {594ms} Character>>isAlphaNumeric | | | |2.6% {488ms} Character>>isLetter | | | | 1.5% {292ms} Character>>characterSet | | | | |1.3% {252ms} EncodedCharSet class>>charsetAt: | | | | | 1.3% {244ms} Array(SequenceableCollection)>>at:ifAbsent: | | | | | 1.0% {196ms} primitives | | | | 1.0% {196ms} Unicode class>>isLetter: | | |1.5% {293ms} FMMSEParser>>next | | | 1.2% {235ms} MultiByteFileStream>>next | |5.0% {939ms} MSEImporter(FMImporter)>>beginAttribute: | | |4.5% {860ms} FMFutureElement>>beginAttribute: | | | 3.1% {597ms} PhexMatcher>>beTrue | | | 3.1% {585ms} PhexMatcher>>true | | | 2.5% {465ms} PhexMatcher>>expectedUnknownMessageToReturn: | | | 1.2% {219ms} Array(Collection)>>copyWithout: | | | |1.1% {213ms} Array(Collection)>>reject: | | | 1.1% {211ms} PhexMatcher>>expect:describeShould:describeShouldNot: | |1.5% {287ms} FMMSEParser>>tOPEN | | 1.3% {250ms} primitives |3.4% {648ms} MSEImporter(FMImporter)>>beginElement: | |3.2% {605ms} FMFutureElement class>>with:name: | | 3.2% {605ms} FMFutureElement>>with:name: | | 2.6% {502ms} FM3MetaDescription>>createInstance | | 2.5% {473ms} FAMIXNamespace class(Behavior)>>new |2.8% {531ms} FMMSEParser>>tFULLNAME | |1.2% {231ms} Character>>isAlphaNumeric |1.7% {314ms} FMMSEParser>>increment | |1.6% {310ms} Job>>value: | | 1.6% {310ms} Job>>currentValue: | | 1.6% {310ms} Job>>announceChange | | 1.6% {310ms} Job>>announce: | | 1.6% {310ms} Announcer>>announce: | | 1.6% {310ms} SubscriptionRegistry>>deliver: | | 1.6% {310ms} SubscriptionRegistry>>deliver:to: | | 1.6% {310ms} SubscriptionRegistry>>deliver:to:startingAt: | | 1.6% {310ms} AnnouncementSubscription>>deliver: | | 1.6% {310ms} MessageSend>>cull:cull: | | 1.6% {306ms} MessageSend>>cull: | | 1.6% {300ms} MessageSend>>value: | | 1.6% {298ms} MessageSend>>valueWithArguments: | | 1.5% {290ms} SystemProgressMorph class>>updateJob: | | 1.2% {231ms} JobProgressMorph>>label: | | 1.2% {229ms} JobProgressMorph(Object)>>changed: | | 1.2% {227ms} SystemProgressMorph>>update: | | 1.1% {211ms} SystemProgressMorph>>refresh | | 1.1% {211ms} PasteUpMorph>>displayWorld | | 1.1% {211ms} PasteUpMorph>>privateOuterDisplayWorld | | 1.1% {211ms} WorldState>>displayWorld:submorphs: |1.5% {279ms} FMMSEParser>>Serial 1.2% {229ms} MSEImporter>>endDocument 1.2% {229ms} FMRepository>>addAll: 1.2% {229ms} FMRepository>>add: 1.2% {225ms} IdentitySet(Set)>>add: **Leaves** 7.5% {1420ms} OrderedCollection>>do: 7.0% {1335ms} ByteString(String)>>= 3.0% {564ms} SmallInteger(ProtoObject)>>~~ 2.9% {559ms} FMMSEParser>>tOPEN 2.9% {549ms} Array(SequenceableCollection)>>at:ifAbsent: 2.7% {517ms} FAMIXParameterizedType(Object)>>= 2.1% {397ms} MultiByteFileStream(StandardFileStream)>>basicNext 1.8% {344ms} ByteString class(String class)>>new: 1.7% {318ms} WriteStream>>reset 1.6% {310ms} MultiByteFileStream>>next 1.6% {301ms} WriteStream>>nextPut: 1.5% {292ms} FMMSEParser>>tWHITESPACE 1.1% {204ms} FMMSEParser>>next 1.1% {200ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 1.1% {200ms} FMMultivalueLink(Collection)>>detect:ifNone: 1.0% {195ms} SmallInteger(Magnitude)>>between:and: 1.0% {191ms} Unicode class>>isLetter:
**Memory** old +35,101,980 bytes young -1,271,824 bytes used +33,830,156 bytes free +1,354,584 bytes
**GCs** full 2 totalling 2,268ms (12.0% uptime), avg 1134.0ms incr 1263 totalling 2,632ms (14.0% uptime), avg 2.0ms tenures 569 (avg 2 GCs/tenure) root table 0 overflows