vektah / CodeGlance

Intelij IDEA plugin for displaying a code mini-map similar to the one found in Sublime
BSD 2-Clause "Simplified" License
1.06k stars 104 forks source link

High CPU loads when opening a large (>10k lines) files #218

Closed ArtsiomCh closed 5 years ago

ArtsiomCh commented 6 years ago

When opening a large file like io.reactivex.Observable (~14k lines), after Idea core and other plugins work done, one of the CPU core stay 100% for a few minutes (during that time the minimap stays empty) then the minimap displayed.

Presume CodeGlance trying to parse the whole file up front, that's cause that CPU loads and delay in displaying the minimap.

Gonna try to dive into source code and try to fix that. Any bits of advice and thought are welcome.

ArtsiomCh commented 6 years ago

The issue, actually, is with skipping a large amount of folded regions while building minimap. To reproduce this issue in io.reactivex.Observable: open the file and then fold all regions by Ctr+Shift+ <->.