> On 01 Oct 2015, at 11:18, Henrik Nergaard <[email protected]> wrote:
> 
> Hi,
> 
> Is there a simple way to query a variable to check how many methods that
> access it? (just want to know the size)
> 
> This works, but it is quite slow. 
> (Morph whichSelectorsAccess: #owner) size 

this one could be made faster by adding a #accessesField: method on 
CompiledMethpd to not have to call
both readsField: and writeFiled (and thus decode the byte code twice on no 
match).

But in general the approach of searching all byte code will be slow.

One idea I always liked is to invest into some general “indexing” 
infrastructure… search indexes take memory, but
they could be build on need and flushed when not used.

        Marcus

Reply via email to