There are as always various questions involved on caching and persistance layers, which are independent of XOTcl:
- do all objects fit into memory (or fit into the memory of every thread)?
- how is the cache coherency problem solved? If the objects do not change, everything is simple. If there are multiple caches (e.g. multiple connection threads, or one level higer: a cluster configuration), how is the invalidation protocol defined, in case of aolsever: how is the notification between threads implemented. the easier approach is to use nsvs (not very fast) or a thread as object pool interfacing the database. if every access to the objects data goes over a single interface, this is doable in various ways, if the object's data is changed via direct database operations, it becomes an issue to inform the affected objects.
The speed of access to the objects in memory depends certainly on your search operations. The access over the object name is very fast, sequential search is certainly slower (but often fast enough). Finally, nothing prohibits the developer to setup and maintain an index via hash a hash table (e.g. associative array or maybe a dict in tcl 8.5).