Eclipse 2023-09: Debugging Performance implementing Custom Annotations in a Large Spring Boot Application
I'm not sure how to approach I'm wondering if anyone has experience with I'm experiencing important performance optimization when debugging my Spring Boot application that heavily relies on custom annotations. As I step through my code, the debugger becomes sluggish, and I sometimes see the following behavior message: `Java HotSpot(TM) 64-Bit Server VM warning: want to open file <path to .class file>` even though the classes are compiled and located in the expected directories. I have a large number of classes that utilize these custom annotations, which are processed at runtime via reflection. Here's a snippet of how the annotations are defined: ```java @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface MyCustomAnnotation { String value(); } ``` And when I use it in my classes, it's like this: ```java @MyCustomAnnotation("example") public class MyService { // Service methods } ``` In the main application class, I have a component scan set up: ```java @SpringBootApplication(scanBasePackages = "com.example") public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } } ``` I suspect that the scenario might be related to the sheer number of reflection calls being made during debugging. To address the performance, I've tried the following: - Increasing the heap size in Eclipse's configuration (`-Xmx2048m` and `-Xms1024m`). - Disabling certain Eclipse plugins that I wasn't using. - Cleaning and rebuilding my project multiple times. - Using the **"Step Filters"** option in the debugger to skip over library code. Despite these efforts, the performance does not improve, and I often end up having to terminate the debugging session due to freezing. Is there a recommended approach to optimize debugging performance in Eclipse when dealing with custom annotations and a large codebase? Any insights or best practices would be appreciated! Is this even possible? This is part of a larger service I'm building. Has anyone dealt with something similar?