Re: predicting function calls?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: predicting function calls?

From: Roy Smith <roy@panix.com>
Date: Sat Dec 31 2005 - 15:50:27 CET

In article <41ng2lF1fg0bkU1@individual.net>, Ernst Noch <enoch@gmx.net>
wrote:

> Couldn't you just, for every access to a member of your object, first
> try to treat is as an access to an operation? If this fails (you
> mentioned the db will throw an error if this is an attribute instead of
> an operation), fall back to ask the db for an attribute of that name.
>
> Or maybe just ask the db to look up this attribute in the list of
> operations, depending which is faster.
>
> Btw. if the system is very dynamic, you might have to think about also
> implementing the attributes as proxies.

Well, what I ended up doing is having a proxy for each object. The first
time I access any instance of a given class, I get from the DB a list of
operations for that class and cache it (keyed by class).
Received on Tue Jan 3 03:29:05 2006