On 09.05.23 01:09, MG wrote:
Hi Jochen,
@alas none of the constructors in the attachment is delegating using
"this(..)". As a result I see a lot of code duplication: From my Groovy
code that is just a single ctor with default arguments, the code
duplication is created by the Groovy compiler.
That is very odd and in my opinion not normal
[...]> @I fail a bit to imagine that this is the fault of those table
classes
directly: Quite a few of them display the desired performance, but some
are not, and the biggest offenders depend on the largest & deepest
hierarchy of traits, some inheriting the same trait from more than one
source - that is all the difference I can see (I tried to find other
differences today, but the ones I saw, when checked, all had no impact
on performance).
If I have
trait T1 {}
trait T2 extends T1 {}
trait T3 extends T1 {}
class C1 implements T2, T3 {}
then In C1 I find init code for T1,T2 and T3 and for each only once
If I do
class C2 extends C1 {}
it will have no init code for the traits, C1 is doing that already.
If I do
class C2 extends C1 implements T3 {}
then C2 contains init code for T3, which I think is actually surplus/wrong.
Could it be, that this is what adds up here?
@A trait X would produce also a class X.Trait.Helper: I just realized
that the reason I did not find these class files is, that IntelliJ does
not display; the only files accessible are uninteresting @Trait
annotated interface classes.
Unfortunately I am running out of time, I have a few days to get the
queries back to acceptable speed, so I will probably actually have to
rip out the traits, add their members to each class by hand and replace
them with interfaces...
too bad.
bye Jochen