开发者

Intellij IDEA cursor navigation in editor lags

After running IDEA for a few hours I've noticed that navigation starts to lag in the Editor. When I type something in it takes about 1-2 seconds to unfreeze the cursor. When I open a new line it also freezes for a while (pressing enter 5 times would freeze IDEA for around 10 seconds, if I wait every time until it unfreezes), as well as in similar situations. It feels that it is doing some sort of search (maybe index search) in background when the cursor freezes. Currently jvm heap shows at 292MB out of 674MB.

What such problems can be related to and how to troubleshoot them?

[UPDATE]

Also OutOfMemory exception is thrown.

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.getIn开发者_开发知识库t(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

[UPDATE II]

Note that in Windows Task Manager memory usage is shown at nearly 1GB (which doesn't match suggested 292MB). Intellij built-in memory dump has produced a 500MB file. WTM shown memory in Intellij has gone down to 500MB as well (but it is still slow).


I used to have these types of problems and they seemed to be related to source control integration (Perforce in particular). If you use source control, try to disable it and see what happens.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜