Intellij IDEA游标编辑器中的光标导航延迟
问题描述:
运行IDEA几个小时后,我注意到导航开始在编辑器中滞后。当我输入内容时,大约需要1-2秒来解冻光标。当我打开一条新线时,它也冻结了一段时间(按下输入5次会冻结IDEA大约10秒,如果我每次都等待直到它解冻),以及类似的情况。当光标冻结时,它觉得它在后台进行某种搜索(也许是索引搜索)。目前,jvm堆在674MB中显示为292MB。Intellij IDEA游标编辑器中的光标导航延迟
这些问题可能与哪些问题有关,以及如何排除它们?
[UPDATE]
另外OutOfMemory
则抛出异常。
at com.intellij.util.io.PersistentEnumerator.enumerateImpl(PersistentEnumerator.java:354)
at com.intellij.util.io.PersistentEnumerator.tryEnumerate(PersistentEnumerator.java:175)
at com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:219)
at com.intellij.util.indexing.MapIndexStorage$1$1.compute(MapIndexStorage.java:78)
at com.intellij.util.indexing.MapIndexStorage$1$1.compute(MapIndexStorage.java:70)
Caused by: java.lang.RuntimeException: Mapping failed: C:\Users\...\Application Data\.IntelliJIdea90\system\index\idindex\IdIndex, position=0, length=10485760
at com.intellij.util.io.ReadWriteMappedBufferWrapper.map(ReadWriteMappedBufferWrapper.java:51)
at com.intellij.util.io.MappedBufferWrapper.buf(MappedBufferWrapper.java:68)
at com.intellij.util.io.PagedFileStorage.getBuffer(PagedFileStorage.java:260)
at com.intellij.util.io.PagedFileStorage.get(PagedFileStorage.java:170)
at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:121)
at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:141)
at com.intellij.util.io.PersistentEnumerator.enumerateImpl(PersistentEnumerator.java:279)
... 39 more
Caused by: java.io.IOException: Map failed
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:748)
at com.intellij.util.io.ReadWriteMappedBufferWrapper.map(ReadWriteMappedBufferWrapper.java:48)
... 45 more
Caused by: java.lang.OutOfMemoryError: Map failed
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:745)
... 46 more
[更新II]
注意,在Windows任务管理器中的内存使用情况显示在接近1GB(不匹配建议292MB)。 Intellij内置的内存转储已经产生了一个500MB的文件。 Intellij的WTM显示内存也下降到500MB(但仍然很慢)。
答
我曾经有过这些类型的问题,他们似乎与源代码控制集成(特别是Perforce)有关。如果您使用源代码管理,请尝试禁用它并查看会发生什么情况。
你从哪里找到这个日志输出?我偶尔也会遇到类似的滞后现象。 – 2011-05-20 01:12:11
如果您在Windows上,必须有一个隐藏的目录' \ Documents and Settings \ \ IntelliJIdeaXX。\ system \ log',其中包含日志。对于其他平台/位置,请参阅此[链接](http://devnet.jetbrains.net/docs/DOC-181)。疑难解答详细信息可以在这里找到(http://stackoverflow.com/questions/6047627/intellij-diagnosing-crash-problem) –
Leonid
2011-05-20 08:38:55
我确切(?)同样的问题。这非常烦人。你有没有解决这个问题?如果您提交了错误报告,您是否有链接? – KajMagnus 2012-02-22 07:44:14