Forum OpenACS Development: Re: ad_conn

Collapse
3: Re: ad_conn (response to 1)
Posted by Gustaf Neumann on
the differnce is that most of the work in xotcl is implemented in C rather in Tcl (e.g. switch handling, forwarding). I defined an object ad_conn using the following approach: xotcl has a short-form for
someobject set FLAG VALUE
someobject set FLAG
such one can write
ad_conn FLAG VALUE
ad_conn FLAG
for setting and retrieving values stored as instance variables.

Currently "ad_conn -set" is about the same speed as the old version and it needs a kludge similar to the tcl implementation, because xotcl does not support method-names starting with a "-". The -set could be certainly replaced by something more efficient (e.g. ad_conn store FLAG VALUE) at least in the cases where it matters. I would expect a similar speedup. When i added a filter to ad_conn, i saw much more read than store operations...