Can't make IntelliSense to work with 40K lines-of-code .c file

Answered

I'm struggling to get IntelliSense to work with 40K-lines C file.


I've updated some settings:


file "idea.properties"
commented out the line:
#idea.max.intellisense.filesize=2500


file "clion64.vmoptions"
-Xss2m
-Xms1024m
-Xmx4096m
-XX:MaxMetaspaceSize=4096m
-XX:ReservedCodeCacheSize=1024m





None of these modifications worked for me.

The code is still unrecognized.



Projects builds fine.
Other smaller files have IntelliSense no problem.




What else could be done to get IntelliSense to work with such a big file?



Thanks,
Max
1
7 comments

Hi Max.

Sorry for the inconvenience!
We have the issue in the tracker:
https://youtrack.jetbrains.com/issue/CPP-898
Please comment or upvote.

0
Avatar
Permanently deleted user

Hi Anna!

Are there any estimates on this bug regarding whether it would be fixed, and when it would be fixed?

Our company is thinking about purchasing CLion licenses but this issue is a blocking point.

0

Max,

There is the limit for the sorce file size (512K) because of the performance issues.
Unfortunately, we are not planning to change it in the nearest future.
Sorry for the inconvenience!

0
Avatar
Permanently deleted user

Just out of curiosity, whats the motivation for using such huge files? I would have expected it to be uncomfortable to navigate in etc...

1
Avatar
Permanently deleted user

Well it's a project with large history and I don't know exactly why. Due to historical reasons maybe. The reality is we have such files and we can't handle them with CLion.
To split this file for example for 3 parts would be very diffucult and too dangerous because it would cause a lot of bugs.

1
Avatar
Permanently deleted user

@Trond: we too face this issue.  We have some legacy code which are written a decade or 2 ago and gets maintained for so long.  For such code, no one in my company would approve to rearrange the code just to make CLion happy.  I understand that it is not a good practice but while working with legacy code we have no option to deal with it as it is.

0
Avatar
Permanently deleted user

@anotherlionuser: right now it's not a problem. At least for us.

The limitation on file size was removed a long ago.

With the use of specific tweaks, CLion is working great on these large files.

Use the following CLion settings to increase JVM memory.

Open file:
/home/your_user/.CLion2017.3/clion64.vmoptions
or
/usr/share/clion-2017.3/bin/clion64.vmoptions

 

Add the following lines:

# custom CLion VM options

-Xss30m
-Xms3584m
-Xmx30000m
-XX:NewSize=2048m
-XX:MaxNewSize=2048m
-XX:ReservedCodeCacheSize=2048m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=1000
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Dawt.useSystemAAFontSettings=lcd
-Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine

1

Please sign in to leave a comment.