Forum OpenACS Development: Re: Site nodes scaling problem

Collapse
Posted by Ola Hansson on
If the most time is spent in the four calls at the top and the four calls at the bottom, how about refraining from calling them and thus avoid to copy the the data structures (call by value I suppose)? For instance, it should be perfectly possible to call "nsv_array get site_node_url_by_node_id $node_id" inline to get the url for a node, and quite quickly at that (about the same speed as retreiving it from a copy in a native Tcl array is my guess).

As for updating the cache(s) it ought to be possible to do that inline as well, in a surgical fashion, as opposed to bulk over-writing the old nsv_arrays with the updated Tcl arrays. (I think!)

Another thing which struck me: Assuming I'm right in that the data structures (nsv_array and Tcl array) are copied "by value", is it then possible to do that "by reference" instead?