Performance issue with Jenkins templatesAndGroups
PhLCacheTemplateGroup needed to cache simplifiedTemplatesAndGroups rather templatesAndGroups.
MODIFY
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/instance/initializeTemplatesAndGroups.st
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/instance/initializeTemplatesAndGroups.st
initialize-release
initializeTemplatesAndGroups
- "Set the default value of the templatesAndGroups instance variable. Answer something meaninful only if this does not require time to compute."
+ "Set the default value of the simplifiedTemplatesAndGroups instance variable. Answer something meaninful only if this does not require time to compute."
delegate isLocal
ifTrue: [ self refresh ]
ifFalse: [
"We replace the content by an indication that a full refresh is necessary"
- templatesAndGroups := Array with: PhLEmptyError new ]
\ No newline at end of file
+ simplifiedTemplatesAndGroups := Array with: PhLEmptyError new ]
\ No newline at end of file

MODIFY
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/instance/refresh.st
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/instance/refresh.st
action
refresh
"Request for fetching the content of my template group (and that can take time if my group downloads content from the web)"
- templatesAndGroups := nil
\ No newline at end of file
+ simplifiedTemplatesAndGroups := nil
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/instance/simplifiedTemplatesAndGroups.st
+accessing
+simplifiedTemplatesAndGroups
+ ^ simplifiedTemplatesAndGroups
+ ifNil: [
+ "#simplifiedTemplatesAndGroups will typically use the network and may fail. If the network is unreliable, it is better to save the error and not call #templateAndGroups a thousand times. Let the user interface decide when to try again (by calling #reset)."
+ simplifiedTemplatesAndGroups := [ delegate simplifiedTemplatesAndGroups ]
+ on: PhLError
+ do: [ :err | Array with: err ] ]
\ No newline at end of file

DELETE
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/instance/templatesAndGroups.st
-accessing
-templatesAndGroups
- ^ templatesAndGroups
- ifNil: [
- "#templatesAndGroups will typically use the network and may fail. If the network is unreliable, it is better to save the error and not call #templateAndGroups a thousand times. Let the user interface decide when to try again (by calling #reset)."
- templatesAndGroups := [ delegate templatesAndGroups ]
- on: PhLError
- do: [ :err | Array with: err ] ]
\ No newline at end of file

MODIFY
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/properties.json
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/properties.json
"classvars" : [ ],
"instvars" : [
"delegate",
- "templatesAndGroups"
+ "simplifiedTemplatesAndGroups"
],
"name" : "PhLCacheTemplateGroup",
"type" : "normal"

https://pharo.fogbugz.com/default.asp?11837
Performance issue with Jenkins templatesAndGroups

PhLCacheTemplateGroup needed to cache simplifiedTemplatesAndGroups rather templatesAndGroups.