File size exceeds configured limit (2560000), code insight features not available
Asked Answered
S

11

361

I am trying to work on a large Javascript file in Jetbrains WebStorm 8 and I am getting a message at the top of the editing window that says:

File size exceeds configured limit (2560000). Code insight features not available.

How can I increase the 'configured limit' to get access to all features?

Subclavian answered 14/4, 2014 at 10:39 Comment(0)
R
457

In IntelliJ 2016 and newer you can change this setting from the Help menu, Edit Custom Properties (as commented by @eggplantbr).

On older versions, there's no GUI to do it. But you can change it if you edit the IntelliJ IDEA Platform Properties file:

#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=2500
Reubenreuchlin answered 14/4, 2014 at 10:57 Comment(6)
Remember to put a value like '999999', for Webstorm 11.0.3 removing this field or putting it to an extremely high value (about twelve 9s) didn't work.Van
Code insight features include "inspections" and code formatting. I know both those features didn't work on an 8MB XML file I opened until I increased the file size limit.Minutes
When i do this in android studio it says 'The file C/users/....androidstudio3.0/...../ideas.customproperties does not exist. Create?' Not sure I want to risk screwing something up. Figured out exceeding this limit was why my autocomplete and other features stopped after just noticing this message.Petrie
We can use the same method for JetBrain's IntelliJ IDE derivitives. I've verified in RubyMine 2018.2.1. Like @Andy, I had a situation where I'm reviewing some large, unformatted XML files. Reformatting a 3.5MB files is quite slow, but it works now, and that's what I wanted.Spacecraft
Use that in Android projects when the R resource class isn't recognized, as in this question; because the generated source file exceeds the limit.Splitlevel
still working on android studio 4.2, it asks me to create a new file then I put the size, I had to restart the IDE then it was ok, thank you ;)Furbelow
E
172

This is built from Álvaro González's answer and How to increase IDE memory limit in IntelliJ IDEA on Mac?

Go to Help > Edit Custom Properties

Add:

idea.max.intellisense.filesize=999999

Restart the IDE.

Explicable answered 9/2, 2017 at 22:19 Comment(2)
For Android Studio on Windows, it asked me to create new file C:\Users\<username>\.AndroidStudio2.3\idea.properties. But finally it worked. Many thanks !Apocrypha
If you are wondering, the value is in KB and default is 2500. jetbrains.com/help/idea/tuning-the-ide.htmlLibretto
L
51

Edit config file for IDEA: IDEA_HOME/bin/idea.properties

# Maximum file size (kilobytes) IDE should provide code assistance for.
idea.max.intellisense.filesize=60000

# Maximum file size (kilobytes) IDE is able to open.
idea.max.content.load.filesize=60000

Save and restart IDEA

Lurleen answered 14/8, 2017 at 8:33 Comment(2)
also the default max.content setting is a factor of 10 bigger than the other you have the sameChloride
this answer will work (and, contrary to other answers, it correctly suggests that two properties should be modified). But recommended way is to drop these values in "Edit Custom Properties", as other answers suggestMcgannon
C
50

Go to IDE:

  • STEP 1: Open the menu item: click on Help then click on Edit Custom Properties
  • STEP 2: Set the parameter:idea.max.intellisense.filesize= 999999999
  • STEP 3: restart IDE
Countenance answered 18/12, 2019 at 18:1 Comment(4)
This seems like a repeat of several earlier answers.Reinforcement
This solution works when installing with snapTrap
@Reinforcement technically not a repeat given the value (number of 9s) is higher.Plectrum
Also at the end an IDE restart is required!Indign
C
19

PhpStorm 2020

  1. Help -> Edit Custom Properties.
  2. File will open in Editor. Paste the section below to the file.
 #---------------------------------------------------------------------
 # Maximum file size (kilobytes) IDE should provide code assistance for.
 # The larger file is the slower its editor works and higher overall system memory 
 requirements are
 # if code assistance is enabled. Remove this property or set to very large number 
 if you need
 # code assistance for any files available regardless their size.
 #---------------------------------------------------------------------
 idea.max.intellisense.filesize=2500
  1. File -> Invalidate / Restart -> Restart

This might not update sometimes and you might need to edit the root idea.properties file.

To edit this file for any version of Idea

  1. Go to application location i.e linux => /opt/PhpStorm[version]/bin
  2. Find file called idea.properties Make backup of file i.e idea.properties.old
  3. Open original with any txt editor.
  4. Find idea.max.intellisense.filesize=
  5. Replace with idea.max.intellisense.filesize=your_required_size i.e idea.max.intellisense.filesize=10480 NB by default this size is in kb
  6. Save and restart the IDE.
Conventual answered 5/1, 2021 at 8:26 Comment(1)
Works on GoLand 2022 too.Undercroft
M
6

Instructions for changing this settings in latest Jetbrains products

Editing product64.vmoptions didnt worked for me, but editing idea.properties worked ok. Also in order to be able to work with large files you may need to change values for in product64.vmoptions / product.vmoptions for -Xms and -Xmx

Manoff answered 28/6, 2016 at 20:16 Comment(0)
R
6

For the 64-bit 2020 version

I tried in vain to find the current location of this file for version 2020. When navigating to Help > Edit Custom Properties a new (empty) file is created at appData/Roaming/JetBrains/IntelliJIdea2020.1/idea.properties. There is no /bin directory as some tutorials suggest. However, neither adding the block from the accepted answer to this file nor adding the same file to /bin resulted in an update to my configuration.

I finally discovered that a reference to the same property exists in appData/Roaming/JetBrains/IntelliJIdea2020.1/idea64.exe.vmoptions. It looks like this:

-Didea.max.intellisense.filesize=3470

I changed it to this, which should be adequate for my needs:

-Didea.max.intellisense.filesize=9999

This strikes me as a bug in this version where the behavior of the menu item doesn't reflect what's needed, but it may also be the case that my particular setup is somehow different than stock. I do have PyCharm and the JDK installed.

Reinforcement answered 15/4, 2020 at 20:29 Comment(1)
doesn't this bug causes your problem? youtrack.jetbrains.com/issue/IDEA-190316Ragman
H
5

To clarify Alvaro's answer, you need to add the -D option to the list of command lines. I'm using PyCharm, but the concept is the same:

pycharm{64,.exe,64.exe}.vmoptions:
<code>
    -server
    -Xms128m
    ...
    -Didea.max.intellisense.filesize=999999 # <--- new line
</code>
Hunnish answered 25/5, 2014 at 20:10 Comment(3)
You don't have to add the '-D' and you need to use the idea.properties file not the vmoptions file.Esemplastic
I am using the 64-bit executable and adding it to idea.properties didn't apply the change. Adding the newline as described above fixed this for me. Should there be a comparable idea64.properties file?Ephesian
@Ephesian - There's a PhpStorm.bat file in that same bin directory that suggests there's a -Didea.properties.file=... JVM option :-?Marutani
R
5

For those who don't know where to find the file they're talking about. On my machine (OSX) it is in:

  • PyCharm CE: /Applications/PyCharm CE.app/Contents/bin/idea.properties
  • WebStorm: /Applications/WebStorm.app/Contents/bin/idea.properties
Rookie answered 9/5, 2016 at 20:7 Comment(1)
I'm also an OSX user and the accepted answer worked for me. Performed in RubyMine, but they all should be the same.Spacecraft
D
3

Changing the above options form Help menu didn't work for me. You have edit idea.properties file and change to some large no.

MAC: /Applications/<Android studio>.app/Contents/bin[Open App contents] 

Idea.max.intellisense.filesize=999999 

WINDOWS: IDE_HOME\bin\idea.properties
Dichotomize answered 21/1, 2018 at 16:42 Comment(2)
+ invalidate cache and restart activated this changes for meSawyere
+"idea" lower case, not "Idea"Sawyere
C
3

Windows default install location for Webstorm:

C:\Program Files\JetBrains\WebStorm 2019.1.3\bin\idea.properties

I went x4 default for intellisense and x5 for file size

(my business workstation is a beast though: 8th gen i7, 32Gb RAM, NVMe PCIE3.0x4 SDD, gloat, etc, gloat, etc)

#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#--------------------------------------------------------------------- 
idea.max.intellisense.filesize=10000

    #---------------------------------------------------------------------
    # Maximum file size (kilobytes) IDE is able to open.
    #--------------------------------------------------------------------- 

idea.max.content.load.filesize=100000
Chloride answered 24/7, 2019 at 9:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.