I tried Time profiler on |code method| code := 'a'. method := Object compiler source: code; requestor: nil; failBlock: [ ^nil ]; compile. method putSource: code inFile: 2 withPreamble: [:f | f cr; nextPut: $!; nextChunkPut: 'Behavior method'; cr]. desktop: 37.0% {38ms} MultiByteFileStream(WriteStream)>>nextChunkPut: 34.0% {35ms} MultiByteFileStream(WriteStream)>>cr 29.0% {30ms} InMidstOfFileinNotification class(Exception class)>>signal laptop: 60.0% {4ms} MultiByteFileStream(WriteStream)>>cr 40.0% {2ms} InMidstOfFileinNotification class(Exception class)>>signal Jan Sven Van Caekenberghe-2 wrote
On 30 Jun 2015, at 19:42, Peter Uhnák <
i.uhnak@
> wrote:
Debian (host) "'4,855 per second'"
Ubuntu (vbox) "'4,709 per second'"
Win XP (vbox) "'504.099 per second'"
The difference here is just one order of magnitude and not two... so maybe I should take apart CompileMethod>>putSource:inFile:withPreambule statement by statement.
Is there some more convenient way to do it than wrap each statement in a block? Some way to profile a method or something.
Open the Time Profiler and write your expression there is how you do analysis on the whole tree. It is not perfect but should help you find the bottleneck.
Peter
-- View this message in context: http://forum.world.st/Slow-compilation-on-one-of-my-Windows-PCs-tp4834668p48... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.