Cannot create project from org containing very large metadata volume

Issue #672 resolved
Alan Birchenough created an issue

I can't even get as far as creating a project from one particular client's org because - it seems - of the volume of metadata contained therein. Here is the process I go through: - Invoke new Illuminated Cloud project - Create and validate connection - Create project - IntelliJ apparently does all the right things: Retrieves metadata (with the usual default subscription: classes, components, pages, static resources, triggers), downloads external symbol table data, and then asks for restart / reload - I reload the project or restart the IDE - After reload/restart, the workspace is devoid of directories, no src, nothing - There is a message in the Event Log: Cannot load settings from file '<module path>.iml': <module path>.iml Please correct the file content. I have not been able to reproduce this last detail, but on one occasion as I was trying to figure out what was wrong with the settings file I noticed a message something like 'settings file is too large > 40MB and cannot be loaded'.

As a sanity check, this org contains around 5000 unmanaged components within the above types, also something like 12,000 unmanaged metadata components over all. It certainly seems like the sheer volume of metadata is overwhelming IntelliJ settings and so Illuminated Cloud cannot complete initialization of the project.

I have tried reducing the subscription to include fewer components, but it appears to be the size of the org as a whole that is causing the trouble, not the number of components subscribed to.

Finally, I have attached the relevant .iml file, but there doesn't appear to be anything in there that explains this problem.

I would be grateful for any work-around for this, since currently I just can't use Illuminated Cloud at all with these larger orgs. For more normal-sized ones it is, however, superb.

Comments (4)

  1. Scott Wells repo owner

    Alan, do you happen to see the following in your idea.log (Help>Show Log in Explorer/Finder/Files):

    com.intellij.openapi.util.io.FileTooBigException: /path/to/yourmodule.iml
        at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.checkNotTooLarge(VirtualFileImpl.java:186)
        at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:128)
        at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:122)
    

    If so, you can configure IntelliJ IDEA to handle this. Use Help>Edit Custom Properties to set the IDE properties and, for this specific problem, set the idea.max.content.load.filesize system property. The default is defined as:

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

    based on the file:

    https://github.com/JetBrains/intellij-community/blob/master/bin/idea.properties
    

    You might bump that up to be larger than the .iml file that it's trying to load. If that doesn't work, or if the performance is abysmal, let me know and I'll need to think about other options to help you get it working against these densely-populated orgs.

  2. Alan Birchenough reporter

    Thanks. Yes, that exception does appear in the log. I didn't see it before. (Actually I tried to attach both the log and the iml file to this issue, but couldn't figure out how to get BitBucket to let me attach both.)

    I will try bumping up the limit and see what happens.

  3. Scott Wells repo owner

    Alan, I'm going to resolve this for now assuming that will fix the issue. If not, please feel free to reopen and attach or email your idea.log so I can see what's going on.

  4. Log in to comment