Problem with export project in VS Code

Hello.
I am starting to use VS Code instead of Eclipse.
I can do everything i did with Eclipse.
I have only one problem.
When I use the export project function it takes more 30 minutes, while with Eclipse it takes two minutes.
How can i solve?
Thank you.

  • Hmm that's weird. I tried to export the same project with VS Code and Eclipse and I got pretty similar results.

    Eclipse: ~47s

    VS Code: ~44s

    Sorry for the dumb question but are you exporting to the same drive in both cases?

    I've found that exporting is very I/O bound - if I export to a USB stick (for example), it takes a lot longer. (The export process creates temporary files in a subfolder of your selected export folder.) If you were exporting to a USB stick or a network drive, I would expect very poor performance.

    You could also try to script the export process, in case that's faster for some reason. From the SDK's bin folder, run the following command to see args:

    java -jar monkeybrains.jar

    e.g. From your project folder:

    java -jar PATH//TO/SDK/monkeybrains.jar -o export.iq -e -w -y PATH/TO/DEV/KEY -r -j monkey.jungle

    See [https://developer.garmin.com/connect-iq/connect-iq-basics/getting-started/] for information on how to add the current SDK's location to your path.

  • It's also crazy how much RAM exporting takes - on my system, the java process for the export quickly climbs to 1.7 GB and stays there until the export is done.

    In contrast, CPU usage quickly peaks at 50%, but then quickly goes down to 10-20% and stays there the export is done.

    It's hard to think of why you would be seeing such dramatically different results between Eclipse and VS Code though, since both of them must just be launching the same process with the same arguments.

  • There could be an issue with "which" Java you are using.  In the Eclipse console, you'll see the path used there for your system -

    BUILD: C:\Program Files\Java\jre1.8.0_241\bin\java

    for example on mine

    Then in settings for the MonkeyC extention, set the Java path here:

    I'm not sure if this will help, but worth a try.

  • I installed the same version of java that you indicated in the previous post and now everything works very fast.
    All other operations have also improved considerably.
    Before I used the latest version available: 1.8.0_311.

  • I tried a few versions newer than 241 in eclipse and they really slowed things down and now stick with 241 and never update the JRE

  • Interesting - I was using an older version of OpenJDK 11 without problems. I just updated to the latest version (11.0.13) and still no problems.

    IDK if I would use an older JRE just for Monkey C.

    EDIT: I guess it would be okay (or less risky overall) if you *just* use it for monkey c, and not for anything else on your system.