IntelliJ idea卡顿解决,我遇到的比较管用的方案

Setttings> Build, Execution,Deployment>Debugger> Data Views> Java

取消 Enable "toString()" object view;


Speed up debugging in IntelliJ

Yesterday, I observed painfully slow debugging in IntelliJ. Every step over or step in took almost 10 seconds to perform.

It was a simple Java console application having about some 88k entries in few arrays. I had successfully debugged applications having millions of entries in arrays, lists and maps before without any performance issues.

Then I looked at the toString() implementation of the custom object which I was holding in the array

复制代码
 public String toString() {
        StringBuilder s = new StringBuilder();
        s.append(V + " vertices, " + E + " edges " + NEWLINE);
        for (int v = 0; v < V; v++) {
            s.append(String.format("%d: ", v));
            for (int w : adj[v]) {
                s.append(String.format("%d ", w));
            }
            s.append(NEWLINE);
        }
        return s.toString();
    }

This toString() implementation was looping over all the 88k items and IntelliJ is configured to evaluate toString() after every step.

Turning off the setting Enable toString() data views solved this problem of slow debugging.

Incase you are experiencing slow debugging issues on IntelliJ, do make sure that this setting is turned off.

参考:

Speed up debugging in IntelliJ -- Madhur Ahuja

相关推荐
Littlehero_1211 小时前
QT自定义控件之热换站系统(源码开源)
开发语言·qt
meilindehuzi_a1 小时前
Python 基础语法(1):常量、变量、类型、输入输出与运算符
开发语言·python
caimouse1 小时前
ReactOS 窗口系统分析(5):可见区域与窗口 DC — vis.c + windc.c
c语言·开发语言
OPEN-F2 小时前
Python进阶教程:装饰器与生成器深入
开发语言·python
千里码aicood3 小时前
基于Python的电商数据采集系统(大数据+爬虫)
开发语言·python
福大大架构师每日一题3 小时前
ragflow v0.27.0 发布:Go 后端全面对齐、智能体搜索与知识编译大升级,超全更新解析
开发语言·后端·golang
陈皮波比茶3 小时前
Python项目实战-网络机器人(爬虫)
开发语言·网络·爬虫·python·机器人
法哥20124 小时前
用 C++ 控制 CMW100,到底在干什么?
开发语言·c++
QH139292318804 小时前
NVIDIA H200 H300服务器
运维·服务器·开发语言·网络·信息与通信
OPEN-F5 小时前
Python进阶教程:单元测试与代码质量
开发语言·python·单元测试