Hovering over a native type causes the IDE to freeze for 30 to 40 seconds before documentation displays.

Issue #1593 resolved
quietopus created an issue

How to Reproduce

  1. Open an Apex file with code in an SFDX project using a scratch org connection, with an offline symbol table, indexing complete, etc..
  2. Hover over the word “String” in a type declaration.

IDE freezes for 30 to 40 seconds before the documentation for the String class pops up.

IntelliJ Info

IntelliJ IDEA 2020.1 (Ultimate Edition)
Build #IU-201.6668.121, built on April 8, 2020
Licensed to James Lentini
Subscription is active until December 30, 2020
Runtime version: 11.0.6+8-b765.25 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.3
GC: ParNew, ConcurrentMarkSweep
Memory: 1654M
Cores: 4
Non-Bundled Plugins: Batch Scripts Support, CMD Support, com.andrey4623.rainbowcsv, me.serce.solidity, net.seesharpsoft.intellij.plugins.csv, org.antlr.intellij.plugin, org.antlr.jetbrains.st4plugin, MavenRunHelper, BashSupport, Pythonid, aws.toolkit, com.illuminatedcloud2.intellij, net.ashald.envfile, ru.adelf.idea.dotenv, ru.meanmail.plugin.requirements, org.jetbrains.kotlin, org.intellij.scala, com.intellij.plugins.html.instantEditing, intellij.prettierJS

Illuminted Cloud Info

Comments (7)

  1. quietopus reporter

    Any way to turn this feature off?

    Raised max memory usage to 2048 and disabled various plugins. Issue still happens.

  2. quietopus reporter

    Reducing priority because I rarely need the offending feature and found a way to turn it off:

    Settings > Editor > Code Editing > Quick Documentation > Show quick documentation on mouse move

    Also, changing “Component” attribute because settings structure seems to suggest that the original value mis-categorized the feature.

  3. Scott Wells repo owner

    I had someone else raise this regarding specifically System.String. You mentioned String specifically in your original posting. Is it only happening with that one type for you, or does it happen with other system types? I ask because the Salesforce documentation for that class is HUGE and it does take a while for the Swing HTML component to render it. I have some thoughts on how to address that, but I'd like to know if this an endemic thing with system types or more specific to that one system type.

  4. quietopus reporter

    Now that you mention it, it seems to be an issue mainly with System.String.

    Hovering over Schema.SObject also gives a noticeable pause before displaying docs, but nothing too obstructive, like String.

  5. Scott Wells repo owner

    Thanks for confirming. Yes, it has to do with the size of the bundled offline doc when the native Swing HTML component renders it. System.String is one of the largest ones, but there are a few others in that range. What I'm likely going to do is truncate that documentation if it's over a certain size that results in such a hang before handing it off to that component. I just need to figure out how to do that in a way that doesn't result in invalid HTML. This is on my TODO list for next week or the week after...

  6. Scott Wells repo owner

    I have implemented a fix/workaround for this for inclusion in the next build. On mouse hover, only summary information is displayed for system types; when quick doc is explicitly invoked, the full documentation is displayed. I have also logged a bug/enhancement request against JetBrains for this to be possible without the workaround I've had to implement to make this work.

  7. Scott Wells repo owner

    Fix/workaround delivered in 2.1.2.0. Now only summary information is displayed for system types on mouse hover. Full quick docs are displayed when invoked explicitly.

  8. Log in to comment