usman
this is strange that there is so much trashing of the GC. Now this is probably not the answer but can you apply the change made by alain to see the difference? this change short cuts the use of widestrings.
!Paragraph methodsFor: 'composition' stamp: 'AlainPlantec 9/13/2012 23:45'! composeAll ^ self composeLinesFrom: firstCharacterIndex to: text size delta: 0 into: OrderedCollection new priorLines: Array new atY: container top! !
stef
On Sep 13, 2012, at 6:13 PM, Usman Bhatti wrote:
Hello all,
I sat with Benjamin today to have a look at Glamour performance when displaying large text files. For reminder, when displaying text in glamour, the time to display text increases exponentially with the size of the text being displayed.
Two observations:
1/ Whereas, with the following script the execution time remains equivalent to that of morphs
MessageTally spyOn: [ (GLMPluggableTextMorph on: [ (StandardFileStream fileNamed: 'testfile-glam-3500.txt') contents ] text: #value accept: nil) openInWindow extent: (1273.0@738.0) ]
the execution of this script is four times longer:
| browser text| browser := GLMTabulator new. browser column: #text. browser transmit to: #text; andShow: [ :a | a text title: 'Text with selection'; display: [(StandardFileStream fileNamed: 'testfile-glam-3500.txt') contents]]. MessageTally spyOn: [browser openOn: 2].
2/ A bit of digging (using time profiler) shows that the garbage collector is taking 75% of the execution time. <image.png>
Doru, will you have an idea what makes garbage collector execute and take extra seconds when the text is displayed in a glamour browser instead of individual glmaour widget?
The moose image with the scripts can be found here if you want to have a look. http://dl.dropbox.com/u/11804892/glamour-perf-tests.zip
thanx in advance,
Usman _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev