CLIM mail archive

[Prev][Next][Index][Thread]

ACCEPT-VALUES pane & caching



    Date: Thu, 21 Nov 1991 23:56 EST
    From: Mabry Tyson <TYSON@ai.sri.com>

    I have a pane which is an ACCEPT-VALUES pane.  The simplest way to describe
    it would be that it is similar to the Namespace Editor on the Symbolics
    (I apologize to those not familiar with that interface), except that the
    you enter the object to edit as the response to the first ACCEPT in the
    pane.   All the other ACCEPTs change according to the type of the object
    and the values associated with that object.

    My concern is that the searching of the cached queries (by
    :QUERY-IDENTIFIER) over time will become a bottleneck.  So when the user
    changes the object, every ACCEPT on the pane that gets called for that
    object will cause the system to check the cache to see if that query (for the
    ACCEPT) had already been displayed.  With, say, 50 queries per object and
    several hundreds of objects over the life of this pane, a lot of structure
    may be stored in the caches.  (That's only, say, 50*300 queries but how
    much structure is stored per query?)

More structure is stored than I would like personally, but it's not too
bad, really.

    I'm not the end-user of this particular pane so I don't have the experience
    but one end-user is complaining about the slowness.  I don't know whether
    the slowness is just in the displaying (which I have little control over) 
    or whether it might be due to searching the caches (and the resultant paging).

    As is reasonable, the caching of queries is internal stuff and so not
    documented.  I was hoping I could recursively call ACCEPTING-VALUES anew
    each time I changed the object.  I tried that but ran into problems.

What problems?  This works for me, although if you are using Genera, I
do not think that CLIM 27.x works completely for nested ACCEPTING-VALUES.

    So, what I (think I) need is a way to be able to clear out the cache of
    queries so it doesn't just get bigger and bigger over the life of the pane.

    Any suggestions?

Here is how I would define a function to clear the query cache:

 (in-package "CLIM")
 (defmethod clear-accepting-values-query-table ((stream avv-stream))
   (clrhash (slot-value (slot-value stream 'avv-record) 'query-table)))
 
It will surely clear the cache, but I don't know what else might break
along the way.  I also don't know if that will be your bottleneck.  It
is surely worth trying it to see what happens.

0,,

References:

Main Index | Thread Index