This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [ecj] Patch: FYI: misc. annotation bug fixes
- From: Andrew Haley <aph at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: Wed, 18 Oct 2006 15:26:13 +0100
- Subject: Re: [ecj] Patch: FYI: misc. annotation bug fixes
- References: <m3wt6ybkra.fsf@localhost.localdomain>
Re annotations:
Method.getAnnotation(interface T) indirectly calls
AnnotationInvocationHandler.create(), which creates a new class
Proxy(T) for every annotation on that method.
This strikes me as absurdly heavyweight.
There is a FIXME on Class.getDeclaredAnnotations() that says "could
cache the value here..." Well, yeah. That would be good. ;-)
Anyway, our current implementation of Proxy is very inefficient. It
occurs to me that if we are going to be using Proxies so heavily it
might make sense to write an efficient version of that class for gcj.
It wouldn't be hard.
Thoughts?
Andrew.