From: ratne (Anna Ratner)

Subject: Re: [spr16184] Time considerations in a CLOS application

Date: 1997-5-12 12:52


To: Suresh Kalathur

>> We had an application written in CLOS and when I took the Time >> profile, I see it is being dominated by a few calls which I am >> showing below (expecially the :DISCRIMINATOR calls)
>> Could you please give suggestions why they are the dominant ones >> and any way to avoid it.
n-n-reader is the discriminator which is used when an accessor method has been called with more than one class (i.e. it could have been called with an argument of the exact class specified as the argument for the accessor method, or it could be called with an argument of any subclass of that class, for which there is no more-specific method). n-n-reader is slower than one-class-reader, which is installed in a method which has only ever been called with one class, because n-n-reader has to look up the exact accessor in a cache, whereas one-class-reader needs no lookup; it does not even have to invoke the method; it needs only look up the value it has cahced away (assuming that value has not been invalidated by a setf on that slot). To keep a one-class-reader from becoming an n-n-reader, we need to figure out which method is the high-roller on the profile, and why it is being called with many classes. Please send us the portion of the (prof:show-call-graph) output which shows the callers of n-n-reader. Please send additional e-mail related to this problem report to <franz.com at bugs> with the identifier spr16184 in the subject line. Thank you, Anna. Anna Ratner, Franz Inc. 1995 University Avenue, Suite 275 <franz.com at ratner> (internet) Berkeley, CA 94704 Phone: (510) 548-3600 FAX: (510) 548-8253 ACL Unix FAQ: ftp.franz.com:/pub/faq ACL Windows FAQ: ftp.franz.com:/pub/acl4w-faq