Hi all,
On Monday I noticed that some Squot tests started to fail on Travis CI
due to timeouts (test cases exceeding the 5 sec default timeout). The
problems are not due to changes in Squot itself because if I retrigger
an older build which was already green, it also fails. So I suspect a
change in Squeak Trunk, since the Squeak 5.2 builds are also not
affected.
I did not yet find the cause, but would like to make known what I
found so far. Does anyone have an idea what could have caused this? Of
course I don't expect you to debug my test cases, but maybe you have a
hint for me.
- The Mac builds are much more affected than the Linux builds. This
could be due to differences in Travis CI's setup for the operating
systems. The Linux test runs also got slower, but not by so much.
- Both the 64 bit and 32 bit Mac builds got slower. The 64 bit ones
scratch at the 5 sec mark, but did not exceed it yet.
- If I repeat older Mac builds, they experience the same slowdown.
- The tests on Squeak 5.2 are unaffected on either platform.
- Some tests take about 6x up to 20x more time than before. On Linux
it is only up to x3 times slower and in sum hardly noticeable. For the
rest of this, I will only talk about the Mac Trunk builds.
- testTrackingAPackage has the worst ratio, whereas testTrackingAClass
is virtually unaffected.
- Only tests that involve whole packages, not individual objects or
single classes, seem to be affected. Is the regression in something
that PackageInfo does (enumerating classes, methods, accessing
categories)?
- Surprisingly, the tests with Git are less worse than the tests with
a stub in-memory repository (these are the same test cases, but with a
different backend object). I think the Git tests by chance ran after
the in-memory tests, maybe that affects things, I don't know yet. The
Git tests did not reach the 5 sec mark.
- Tests that involve Monticello (such as the Monticello->Git
conversion) and do not only create MCDefinitions and pass them around,
take about 2x as long now.
For reference:
Good build: https://travis-ci.org/github/hpi-swa/Squot/jobs/698280144
Bad build: https://travis-ci.org/github/hpi-swa/Squot/jobs/700640404
The runtimes are annotated to the test cases when you expand them.
If you do want to look at the code, just load the Git Browser, then
you will also have the test cases.
If I find out more on the weekend, I will post again.
Kind regards,
Jakob
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.900.mcz
==================== Summary ====================
Name: Collections-ul.900
Author: ul
Time: 23 June 2020, 10:48:18.28482 pm
UUID: ff11e218-b6f4-44db-bd02-2e2284158946
Ancestors: Collections-mt.898
- enable the use of primitive 158 in String >> #compareWith:collated: because when collation is specified, the VM does not use the jitted version
- fix: String >> #compare:caseSensitive: needs to transform the return value of String >> #compareWith:collated:
- speed up ReadStream >> #match: when the receiver's class is ReadStream
=============== Diff against Collections-mt.898 ===============
Item was added:
+ ----- Method: ReadStream>>match: (in category 'positioning') -----
+ match: subCollection
+ "Faster version than the one implemented by super, but due to my subclasses breaking various invariants true for actual ReadStreams, only use it when the receiver's class is ReadStream."
+
+ | matchPosition |
+ self class == ReadStream ifFalse: [ ^super match: subCollection ].
+ subCollection isEmpty ifTrue: [ ^true ].
+ matchPosition := collection indexOfSubCollection: subCollection startingAt: position + 1.
+ matchPosition = 0 ifTrue: [ ^false ].
+ matchPosition <= readLimit ifFalse: [ ^false ].
+ position := matchPosition + subCollection size - 1.
+ ^true!
Item was changed:
----- Method: String>>compare:caseSensitive: (in category 'comparing') -----
compare: aString caseSensitive: aBool
"Answer a comparison code telling how the receiver sorts relative to aString:
1 - before
2 - equal
3 - after.
"
+ | map result |
- | map |
map := aBool ifTrue:[CaseSensitiveOrder] ifFalse:[CaseInsensitiveOrder].
+ result := self compareWith: aString collated: map.
+ result = 0 ifTrue: [ ^2 ].
+ ^result > 0
+ ifTrue: [ 3 ]
+ ifFalse: [ 1 ]!
- ^(self compareWith: aString collated: map) + 2!
Item was changed:
----- Method: String>>compareWith:collated: (in category 'comparing') -----
compareWith: aString collated: collation
+ <primitive: 158>
- "<primitive: 158>"
^(self compare: self with: aString collated: collation) - 2!
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.901.mcz
==================== Summary ====================
Name: Collections-ul.901
Author: ul
Time: 29 June 2020, 2:08:55.776619 am
UUID: 8df577a2-3856-4432-b54c-25c93831b5a8
Ancestors: Collections-ul.900
Fix regression in ReadStream >> #match:. When the subCollection is not present in the receiver, the stream's position must be set to the end to match the original behavior.
=============== Diff against Collections-ul.900 ===============
Item was changed:
----- Method: ReadStream>>match: (in category 'positioning') -----
match: subCollection
"Faster version than the one implemented by super, but due to my subclasses breaking various invariants true for actual ReadStreams, only use it when the receiver's class is ReadStream."
| matchPosition |
self class == ReadStream ifFalse: [ ^super match: subCollection ].
subCollection isEmpty ifTrue: [ ^true ].
matchPosition := collection indexOfSubCollection: subCollection startingAt: position + 1.
+ matchPosition = 0 ifTrue: [
+ position := readLimit.
+ ^false ].
- matchPosition = 0 ifTrue: [ ^false ].
matchPosition <= readLimit ifFalse: [ ^false ].
position := matchPosition + subCollection size - 1.
^true!
A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-jr.726.mcz
==================== Summary ====================
Name: Monticello-jr.726
Author: jr
Time: 28 June 2020, 10:07:19.980052 pm
UUID: e8c6b590-8826-0144-a535-13cfa140b5dd
Ancestors: Monticello-mt.725
Fix wrong traitCompositions in packages loaded from source.st
As of Collections-ul.900, ReadStream>>match: does not alter the Stream position if the search sequence was not found. Failure to find the search sequence is indicated via the return value, but it was not checked in classDefinitionFrom:.
The error could trigger load failures after loading Monticello-jr.720, in which the trait composition became relevant beyond just creating the class.
The error did not surface for .mcz version files that contain a correct snapshot.bin file, which allows to forego the reading of the source.st file.
There are versions out there without the snapshot.bin file. INIFile-jf.3.mcz as served by Squeaksource is such a version at the moment.
=============== Diff against Monticello-mt.725 ===============
Item was changed:
----- Method: MCStReader>>classDefinitionFrom: (in category 'converting') -----
classDefinitionFrom: aPseudoClass
+ | tokens definitionStream hasTraitComposition traitCompositionString lastIndex hasClassTraitComposition classTraitCompositionString typeOfSubclass className |
- | tokens traitCompositionString lastIndex classTraitCompositionString typeOfSubclass className |
tokens := Scanner new scanTokens: aPseudoClass definition.
+ definitionStream := ReadStream on: aPseudoClass definition.
+ hasTraitComposition := definitionStream match: 'uses:'.
+ traitCompositionString := hasTraitComposition ifTrue: [(definitionStream upToAll: 'instanceVariableNames:') withBlanksTrimmed] ifFalse: ['{}'].
+ definitionStream := ReadStream on: aPseudoClass metaClass definition asString.
+ hasClassTraitComposition := definitionStream match: 'uses:'.
+ classTraitCompositionString := hasClassTraitComposition ifTrue: [(definitionStream upToAll: 'instanceVariableNames:') withBlanksTrimmed] ifFalse: ['{}'].
- traitCompositionString := ((ReadStream on: aPseudoClass definition)
- match: 'uses:';
- upToAll: 'instanceVariableNames:') withBlanksTrimmed.
- classTraitCompositionString := ((ReadStream on: aPseudoClass metaClass definition asString)
- match: 'uses:';
- upToAll: 'instanceVariableNames:') withBlanksTrimmed.
- traitCompositionString isEmpty ifTrue: [traitCompositionString := '{}'].
- classTraitCompositionString isEmpty ifTrue: [classTraitCompositionString := '{}'].
lastIndex := tokens size.
className := tokens at: 3.
typeOfSubclass := self typeOfSubclass: (tokens at: 2).
"Compiled code classes are special cases of the #bytes class type"
(#bytes == typeOfSubclass and: [self compiledCodeClassNames includes: className])
ifTrue: [typeOfSubclass := #compiledMethod].
^ MCClassDefinition
name: className
superclassName: (tokens at: 1)
traitComposition: traitCompositionString
classTraitComposition: classTraitCompositionString
category: (tokens at: lastIndex)
instVarNames: ((tokens at: lastIndex - 6) findTokens: ' ')
classVarNames: ((tokens at: lastIndex - 4) findTokens: ' ')
poolDictionaryNames: ((tokens at: lastIndex - 2) findTokens: ' ')
classInstVarNames: (self classInstVarNamesFor: aPseudoClass)
type: typeOfSubclass
comment: (self commentFor: aPseudoClass)
commentStamp: (self commentStampFor: aPseudoClass)!
Christoph Thiede uploaded a new version of ToolBuilder-MVC to project The Inbox:
http://source.squeak.org/inbox/ToolBuilder-MVC-ct.60.mcz
==================== Summary ====================
Name: ToolBuilder-MVC-ct.60
Author: ct
Time: 27 June 2020, 10:37:01.784959 pm
UUID: dd09ecec-d16e-854c-8564-d21576eb58fc
Ancestors: ToolBuilder-MVC-mt.59
Don't fail in MVCToolBuilder when opening a menu
The semantics of ToolBuilder >> #open: are to work regardless of the build state of the passed object (thus "anObject"). As a consequence, [MVCToolBuilder new open: (MVCToolBuilder new build: PluggableMenuSpec new)] should work, too.
=============== Diff against ToolBuilder-MVC-mt.59 ===============
Item was changed:
----- Method: MVCToolBuilder>>open: (in category 'opening') -----
open: anObject
"Build and open the object. Answer the widget opened."
| window |
+ window := (anObject isKindOf: View orOf: PopUpMenu)
- window := (anObject isKindOf: View)
ifTrue: [anObject]
ifFalse: [self build: anObject].
(window isKindOf: PopUpMenu)
ifTrue: [window invokeOn: nil].
(window isKindOf: View)
ifTrue: [window controller open].
^window!
A new version of ToolBuilder-Kernel was added to project The Inbox:
http://source.squeak.org/inbox/ToolBuilder-Kernel-ct.140.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-ct.140
Author: ct
Time: 27 June 2020, 10:27:56.320705 pm
UUID: 41f2d454-481e-354d-9b19-6a275ef01e56
Ancestors: ToolBuilder-Kernel-mt.138
Don't fail in PluggableMenuSpec when building an empty menu
=============== Diff against ToolBuilder-Kernel-mt.138 ===============
Item was changed:
----- Method: PluggableMenuSpec>>analyzeItemLabels (in category 'construction') -----
analyzeItemLabels
"Analyze the item labels"
+ self items do: [:item | item analyzeLabel].!
- items do:[:item| item analyzeLabel].
- !