Hey guys,
first of all, I'm a big fan of lombok and use it in nearly every of mine private projects.
Unfortunately, I had dramatic performance issues while trying to edit a class with a large amount of @Singular annotations in Intellij Idea and the latest version of the lombok plugin.
I created a small example to demonstrate the problem:
import lombok.Builder;
import lombok.Singular;
import java.util.Collection;
@Builder
public class SingularPerformanceIssueDemo {
@Singular
private Collection<String> number_0_strings;
@Singular
private Collection<String> number_1_strings;
@Singular
private Collection<String> number_2_strings;
@Singular
private Collection<String> number_3_strings;
@Singular
private Collection<String> number_4_strings;
@Singular
private Collection<String> number_5_strings;
@Singular
private Collection<String> number_6_strings;
@Singular
private Collection<String> number_7_strings;
@Singular
private Collection<String> number_8_strings;
@Singular
private Collection<String> number_9_strings;
@Singular
private Collection<String> number_10_strings;
@Singular
private Collection<String> number_11_strings;
@Singular
private Collection<String> number_12_strings;
@Singular
private Collection<String> number_13_strings;
@Singular
private Collection<String> number_14_strings;
@Singular
private Collection<String> number_15_strings;
@Singular
private Collection<String> number_16_strings;
@Singular
private Collection<String> number_17_strings;
@Singular
private Collection<String> number_18_strings;
@Singular
private Collection<String> number_19_strings;
public static void main(String[] args) {
for (int i = 0; i < 20; i++) {
System.out.println("\t@Singular\n" + "\tprivate Collection<String> number_" + i + "_strings;\n");
}
}
}
This is IMHO a bug and need to be fixed.
My current workaround for this problem is to annotate a constructor with @Builder and use Collections.immutableCollection(...) to support the needed feature of @Singular.
Thank you
Hey guys,
first of all, I'm a big fan of lombok and use it in nearly every of mine private projects.
Unfortunately, I had dramatic performance issues while trying to edit a class with a large amount of
@Singularannotations in Intellij Idea and the latest version of the lombok plugin.I created a small example to demonstrate the problem:
This is IMHO a bug and need to be fixed.
My current workaround for this problem is to annotate a constructor with
@Builderand useCollections.immutableCollection(...)to support the needed feature of@Singular.Thank you