[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with eql specializers
- To: Daniel A Haug <firstname.lastname@example.org>
- Subject: Re: Help with eql specializers
- From: kanderso@DINO.BBN.COM
- Date: Tue, 25 Jul 89 16:33:33 -0400
- Cc: commonloops.pa@Xerox.COM, email@example.com
- In-reply-to: Your message of Tue, 25 Jul 89 13:18:32 -0500. <8907251818.AA18468@shrike.Austin.Lockheed.COM>
- Redistributed: commonloops.pa
Date: Tue, 25 Jul 89 13:18:32 CDT
From: Daniel A Haug <aihaug@AUSTIN.LOCKHEED.COM>
To: firstname.lastname@example.org, kanderso@DINO.BBN.COM
Subject: Re: Help with eql specializers
Cc: email@example.com, firstname.lastname@example.org
> From kanderso@DINO.BBN.COM Tue Jul 25 08:39:32 1989
> To: Daniel A Haug <email@example.com>
> Cc: firstname.lastname@example.org, email@example.com
> Subject: Re: Help with eql specializers
> I think i see what your problem is.
> When you define a method, PCL invalidates the generic function. The
> next time you call that function, it gets rebuilt. This makes the
> first call very slow. Subsequent calls are at full speed.
But this is not what's happening. I can make repeated calls to those
set of functions I posted, and the invalidation happens EVERY time.
But this is isolated ONLY to those functions. It is not a general
problem with all of our code.
OK, the culprit is COMPUTE-COLUMN-SPECIALIZERS and the super culprit
is UPDATE-METHOD-INHERITANCE (the Skurge of PCL).
Here is what is happening:
1. You have 2 or more generic functions that is specialized on the
class T AND on some symbol. One of them is HANDLE-VIEW-CONTEXT-CLICK,
lets call the other one FROINK. Somehow in your mouse handling loop
there is a chain of function calls that leads from 1 to the other.
Suppose H-V-C-C gets called first. It is invalidated (how do i know
this?). In the process of becoming valid it calls
COMPUTE-COLUMN-SPECIALIZERS in an attempt to compute the combined
methods. This calls UPDATE-CLASS on a new instance of
EQL-SPECIALIZER-CLASS for each EQL specialized methods you have (3).
This in tern calls UPDATE-METHOD-INHERITANCE and invalidates every
generic function on such classes as SYMBOL and T. This in turn causes
FROINK to be invalidated.
So you get in an infinite loop of validation and invalidation, and
there is never more than 1 valid generic function specialized by T and
EQL on a symbol at a time!!!!! While you are running your loop, much
of your system is being invalidated. THIS IS A HORRIBLE BUG!
We can probably fix it by having COMPUTE-COLUMN-SPECIALIZERS be
smarter, but UPDATE-METOD-INHERITANCE is the REAL culprit as it
needlessly invalidates many functions.