Index: openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl,v diff -u -r1.29.6.7 -r1.29.6.8 --- openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 12 Jan 2015 12:12:31 -0000 1.29.6.7 +++ openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 6 Apr 2015 08:40:02 -0000 1.29.6.8 @@ -148,6 +148,9 @@ PackageMgr ad_proc get_package_class_from_package_key {package_key} { Obtain the package class from a package key } { + set key ::xo::package_class($package_key) + if {[info exists $key]} {return [set $key]} + foreach p [::xo::PackageMgr allinstances] { # Sanity check for old apps, having not set the package key. # TODO: remove this in future versions, when package_keys are enforced @@ -156,9 +159,11 @@ continue } if {[$p package_key] eq $package_key} { + set $key $p return $p } } + return "" } @@ -270,6 +275,12 @@ my package_key $package_key my instance_name $instance_name } + + # + # Save the relation between class and package_key for fast lookup + # + set ::xo::package_class([my set package_key]) [my info class] + if {[ns_conn isconnected]} { # in case of of host-node map, simplify the url to avoid redirects # .... but ad_host works only, when we are connected....