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

Collapse
Posted by Ola Hansson on
Yes, it is cached on oacs-5-1. However, the problem is that it still takes a long time on the first page hit.

I think (but haven't tested it to verify) that a small increase in speed to site_node::get_children could be achieved by changing site_node::get_from_url (and also get_url) and use something like this:


if { ![catch { nsv_get site_nodes $url } result] } {
    return $result
}

instead of this:
    if {[nsv_exists site_nodes $url]} {
        return [nsv_get site_nodes $url]
    }

It might help since I suppose nsv_exists would take almost as long to execute as nsv_get ... but that is only my assumption.
Collapse
Posted by Jeff Davis on
I timed this and your method is 3 usec/iter for one thats there and the old version is 4 usec/iter. If it's not there the old version is 2 and your new version is 9.

I think we should look elsewhere for optimizations as shaving off a microsecond or two here is not going to make a difference.