Debug Mode Causes Reflection Code to Run Extremely Slow in IntelliJ IDEA 2024.2.4 (Ultimate Edition)
Dear JetBrains Support Team,
I am currently using IntelliJ IDEA 2024.2.4 Ultimate Edition on Windows 10. My application performs a large number of reflection operations during startup. When I run my application in Debug mode, I encounter severe performance issues. Reflection-based operations are extremely slow compared to running in normal mode, with the same reflection code taking approximately 10 times longer to execute. I did not experience this issue with any version of IDEA in 2023, but I cannot remember the exact version.
I suspect this may be due to a new feature in IntelliJ IDEA 2024, which collects execution time statistics during debugging, significantly affecting the performance of reflection-based code. However, I have not found any option to disable this feature.
Could you please confirm if there is a way to disable method execution time tracking, or if there are other debugger-related overheads that might be affecting the performance of reflection operations? If not, are there any workarounds to improve the speed of reflection-based operations during debugging?
Thank you for your assistance!
请先登录再写评论。
Hi - sorry that you're having this problem.
See if it helps to disable the async profiler by selecting the following option in the context menu of the editor gutter:
Documentation on the feature: https://www.jetbrains.com/help/idea/stepping-through-the-program.html#measure_execution_time_with_run_to_cursor
You are also welcome to vote for the feature request to make the option more discoverable.
I am experiencing the same issue as this user, when using run configuration it takes 3minutes but with debug is over 25minutes. The suggestion above did not reduce debug time, do you have any other suggestions?
Big Stewartay Each case can be different. Please file a separate support request via https://intellij-support.jetbrains.com/hc/en-us/requests/new?ticket_form_id=66731 describing your case
Please check https://youtrack.jetbrains.com/articles/SUPPORT-A-594 for possible solutions