Skip to content

Commit

Permalink
Fixed slowdown in actions due to computation of slides.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar Nierstrasz committed Mar 27, 2024
1 parent c78f4ce commit 22d0b41
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/GToolkit-Demo-Slideshows/PrioritySlideshow.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,9 @@ PrioritySlideshow >> exportSlide: slideMethod toFile: aFileReference [
with a FileReference instread of a String"

| element |
element := (BlScripter new element: slideMethod asScalableSlide asElement)
element size: self slideDimensions.
element := (BlScripter new
element: (slideMethod asScalableSlideIn: self) asElement) element
size: self slideDimensions.
BlExporter png
element: element;
fileName: aFileReference;
Expand Down Expand Up @@ -585,7 +586,8 @@ PrioritySlideshow >> priorityFor: aSlideMethodSelector [
{ #category : #utility }
PrioritySlideshow >> scalableSlide: aSlide [
"No longer needed?"
^ aSlide asScalableSlide

^ aSlide asScalableSlideIn: self
]

{ #category : #utility }
Expand Down Expand Up @@ -655,7 +657,8 @@ PrioritySlideshow >> slideDictionary [

| methods |
methods := self slideMethods select: [ :each | each isCompiledMethod ].
^ (methods collect: [ :each | each asSlide -> each ]) asOrderedDictionary
^ (methods collect: [ :each | (each asSlideIn: self) -> each ])
asOrderedDictionary
]

{ #category : #accessing }
Expand All @@ -679,7 +682,7 @@ PrioritySlideshow >> slideDir [
PrioritySlideshow >> slideFor: selector [
"Used in PrioritySlideshow>>#slideDeckPage to embed slides in a Lepiter page."

^ (self class >> selector) asScalableSlideWithBorder
^ self class >> selector asScalableSlideWithBorderIn: self
]

{ #category : #accessing }
Expand Down Expand Up @@ -765,7 +768,8 @@ PrioritySlideshow >> summaryElementFor: slideSelectors [
collect: [ :selector |
| method slide |
method := self class methodNamed: selector.
slide := method asSlide asScalableSlideWithBorder asElement
slide := ((method asSlideIn: self) asScalableSlideWithBorderIn: self)
asElement
margin: (BlInsets all: 10);
yourself ].
container := BlElement new
Expand Down

0 comments on commit 22d0b41

Please sign in to comment.