This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Improve symbol lookup performance noted in PR 15519


> So the speedup comes from calling a more specific lookup routine for
> the task at hand.
> 
> Also note that even in the "after" case we are still doing a lot of
> duplicate lookups.  cp-namespace.c is a bit clumsy in some of the
> lookups it does.  Although it's hampered by having to work with the
> data structures gdb provides it.  My plan is to work on both this
> summer.

This is a bit of a digression, but this reminds me that we have similar
types of issues with Ada (multiple identical lookups), and it's not
easy to prevent them. The way we've dealt with the issue is to implement
a cache, and it yielded good results. I have been meaning to contribute
that code, but it needs to be cleaned up, because the cache invalidation
is performed manually by sprinkling calls to ada-lang here and there,
wherever necessary. This should be done using observers instead, adding
new ones if necessary. Perhaps the same could benefit C++ as well,
and one could even imagine a common cache or at least caching
infrastructure.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]