Forum OpenACS Development: Re: Scalability in site node initialization routine

Collapse
Posted by Ola Hansson on
I have committed a new version of site-master.tcl to HEAD and oacs-5-1 which actually should be very fast.

I changed to a new check that uses a call to "site_node::get_package_url -package_key curriculum" to determine whether to include the bar or not. That proc has been changed by Lars so that it uses a site node-nsv keyed by package_key. Previously it used "get_children" internally.

Sadly, it looks like I made a misstake when I util_memoize'd "set curriculum_bar_p" in site-master.tcl ...

This works:

time { set curriculum_bar_p [llength [util_memoize [list site_node::get_children -all -package_key curriculum -element directory_p -node_id 405]]] } 10
This doesn't work (the result doesn't get cached):
time { set curriculum_bar_p [util_memoize [list llength [site_node::get_children -all -package_key curriculum -element directory_p -node_id 405]]] } 10
And it was the latter that was in site-master.tcl in cvs, so for everyone that uses .LRN and haven't commented out the statement, this explains the extreme slowness! But if you update your code you should be fine.

I am very sorry for the inconvenience.