mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
report each "PSI invalidated outside transaction" trace only once in a more memory-efficient way (IDEA-CR-6268)
This commit is contained in:
@@ -514,7 +514,7 @@ public class DebugUtil {
|
||||
|
||||
private static final ThreadLocal<Object> ourPsiModificationTrace = new ThreadLocal<Object>();
|
||||
private static final ThreadLocal<Integer> ourPsiModificationDepth = new ThreadLocal<Integer>();
|
||||
private static final Set<String> ourNonTransactedTraces = ContainerUtil.newConcurrentSet();
|
||||
private static final Set<Integer> ourNonTransactedTraces = ContainerUtil.newConcurrentSet();
|
||||
|
||||
/**
|
||||
* Marks a start of PSI modification action. Any PSI/AST elements invalidated inside such an action will contain a debug trace
|
||||
@@ -596,7 +596,7 @@ public class DebugUtil {
|
||||
Object trace = ourPsiModificationTrace.get();
|
||||
if (trace == null) {
|
||||
trace = new Throwable();
|
||||
if (ourNonTransactedTraces.add(ExceptionUtil.getThrowableText((Throwable)trace))) {
|
||||
if (ourNonTransactedTraces.add(ExceptionUtil.getThrowableText((Throwable)trace).hashCode())) {
|
||||
LOG.info("PSI invalidated outside transaction", (Throwable)trace);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user