> MessageTally time: [HelpBrowser open]   between 2 seconds in Cog and with a 
> regular VM between 6 and 8....
> is there an easy way to improve it ?
> 
> Alexandre, do you want another place where to put a cache like Metacello's 
> currentVersion?   ;)

:-)
Sure. Easy. 

SystemHelp>>allSystemHelpPragmas takes time. When you open a browser, the 
method HelpBrowser>>open is called once and SystemHelp>>allSystemHelpPragmas 
twice. Easy to suspect that a cache is missing.

So, if you define 
-=-=-=-=-=-=-=-=-=
HelpBrowser>>helpTopic
        ^ helpTopicCache ifNil: [ helpTopicCache := rootTopic asHelpTopic ]
-=-=-=-=-=-=-=-=-=

and adapt HelpBrowser>>refresh you win 50% of execution time.

Here is it:

Attachment: HelpBrowserFix.1.cs
Description: Binary data

http://code.google.com/p/pharo/issues/detail?id=4126

Before this fix, I have:
[HelpBrowser open] timeToRun 
=> 6099

After the fix I have:
[HelpBrowser open] timeToRun 
=> 3094

Naturally, tests are kept green.

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





Reply via email to