Hi, We are looking into optimizing parts of XProce...
# androidx-xprocessing
y
Hi, We are looking into optimizing parts of XProcessing (focus so far was always consistency). One of these is the
getAllMethods
function in
XTypeElement
which requires resolving overrides ( = expensive). Right now, we group methods with their
jvmName
to reduce the # of calls to
overrides
checks, but resolving
jvmName
requires resolving parameter types (in case they are value classes). In practice though, @JvmName annotation is not allowed for overriding methods or open methods, such that we could technically group methods by their visible name (but still use jvmName if we ever need to do an override check). e.g. you cannot do these:
Copy code
@JvmName("foo")
open fun x2() {
}

@JvmName("notf1")
override fun f1() {
}
Now, developers can suppress that error (🤦 ) but we are thinking of either just not supporting it (as in, we would ignore the JvmName for those methods for overrides checks) or maybe add a new config to take that into account (might be a weird option to have). Wanted to share here if anyone has some comments. FYI we are looking at a 15-20x speed improvement for our sample case if we can do this change (which should be be fairly common as most processed methods are not overrides)