BowlerHatLLC / vscode-as3mxml

ActionScript & MXML language extension for Visual Studio Code. Develop apps for Adobe AIR, Adobe Flash Player, or Apache Royale.
https://as3mxml.com/
Apache License 2.0
256 stars 39 forks source link

Request textDocument/codeAction failed #693

Closed ylazy closed 1 year ago

ylazy commented 1 year ago

I'm using the latest build (bundled-compiler + bin).

image

log.txt

joshtynjala commented 1 year ago

java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space

It appears that you may need to increase the maximum memory used by the extension using the as3mxml.languageServer.jvmargs setting. I believe you would do this by specifying Java's -Xmx argument. The example below sets it to 2 GB.

"as3mxml.languageServer.jvmargs": "-Xmx2g"
ylazy commented 1 year ago

Increasing the maximum memory used by the extension seems to fix the issue but it leads to another issue.

image

High CPU + RAM usage when I edit a large .as file.

ylazy commented 1 year ago

Workaround: Restarting VSCode sometimes did, sometimes did not fix the high memory & cpu usage issue. But terminating the java se process always fixes the issue. My memory usage reduced from ~2gb to ~700mb and cpu reduced from ~100% to ~0%.

joshtynjala commented 1 year ago

I'm guessing that this may have been caused by the linter, which I determined is pretty expensive to run, so I turned it off. Let me know if it still happens, but I'm closing for now.