VS Code extremely slow

Team,

I was full of hopes trying to follow the installation instructions to start developing.

Not sure why you killed the Eclipse version and switched to VS Code which I hate to the bone because it's not even a joke of an IDE.

Now, I'm trying to generate the very basic watch face project.
Build time takes forever (more than 3 min).
Simulator start takes forever (more than 3 min).
If I need to make any change in the code it takes forever to reload the project (another 3+3 min?!!! are you kidding me?)

I'm on a Win 11, 32Gb RAM, Core i7 13 gen... What gives?

Thanks.

P.S. I have no idea on how to navigate the code or see any code completion in the editor. I have no idea on how to do ANYTHING in this stupid VS Code. Why on earth did you decide to torture yourself?
P.P.S The way 'documentation/guides' are written is another joke.

  • I'm on Amazon Corretto 21 (aka Open JDK 21).
    What version does it need to work properly?

  • I've been using Temurin-21.06+ 7 from https://adoptium.net without problems, on both Windows and Mac.

    I just upgraded to the latest release [21.0.7+6] on Windows and it seems to work fine.

    Not sure why you're having problems :/.

    I have def seen issues with super long build times with other JDK versions tho

  • P.S. I have no idea on how to navigate the code or see any code completion in the editor. I have no idea on how to do ANYTHING in this stupid VS Code. Why on earth did you decide to torture yourself?

    Regardless of how you feel about Eclipse or VS Code, note that Garmin only added language features -- such as autocompletion, code navigation [go to definition, find all references, etc], real-time errors and warnings, etc. -- in a recent version of the VS Code extension, so the things you're talking about never existed in the Eclipse Monkey C plugin in the first place.

    Yeah, I guess if Garmin had stuck with Eclipse, maybe they would've eventually added those features to the Eclipse plugin?

    Anyway:

    - Go to definition / show all references: CTRL-left click

    - Code completion: this should happen automatically as you type (e.g. if you type part of a symbol, context-sensitive suggestions should show up automatically; same goes when you type a "." after symbol)

    - Function arg names/types/docs: these are displayed as you type a function call, starting from when you type "("

    - API / code documentation: hover over a function call

    - The outline section of the Explorer view (left pane, top tab) should show a list of symbols in the current file

    Most of this stuff "just works" automatically, assuming that the Monkey C extension is working, and ofc assuming that you are using a recent version of the SDK which provides language server support.

    Note that all of this stuff requires you to manually build successfully, at least once. And if your project has errors, some or all of it may stop working. [This may be a limitation of Monkey C, and not necessarily the IDE, as it isn't true for languages like javascript or python. I do know that Monkey C uses ANTLR as the first stage of the build, to build the parse tree from your code, and if you have syntax errors, that stage will fail and no language features will be available. But beyond that, other errors not related to syntax will also cause language features to stop working, like calling a non-existent function.]

    Given that your projects take an unreasonable amount of time to build, it's not surprising that the language features don't seem to be working for you, especially since they depend on building the project in the background as well (the background build doesn't affect the build outputs in the output folder, but it's just done to support the language features)

    I have no idea on how to do ANYTHING in this stupid VS Code

    Most actions should be available via the command palette: CTRL-SHIFT-P (or CTRL-P, >), then type part of the name of the command you are looking for (e.g. "format document", "word wrap", "rename symbol")

    You can quickly switch to an open file using CTRL-P.

    You can quickly find a symbol using CTRL-O (or CTRL-P, @).

    All of the commands related to CIQ start with "Monkey C: ", btw.

    Monkey C extension settings are accessed via:

    - CTRL-SHIFT-P >  "Preferences: Open User Settings"

    - Type "monkey c" in the user settings search field or navigate to Extensions > Monkey C

    Not sure why you killed the Eclipse version and switched to VS Code which I hate to the bone because it's not even a joke of an IDE.

    I realize this is hyperbolic/rhetorical, but AlphaMonkeyC [the Monkey C architect] said in a video that it was done to lower the barrier of entry for new devs. Garmin felt that Eclipse was too complex.

    I don't think VS Code is perfect by any means (it's very bloated - sublime text is much better at handling the rare gigantic file I need to open), but it's under continuous, rapid development and has lots of modern features (e.g. multiple cursors) that Eclipse lacks or only started to adopt in the past couple of years. And when Eclipse and VS Code [or any other modern editor] have similar features [Quick Access and Command Palette], I find the UX of the modern editor to be superior.

    In general, I find the UX of any modern editor to be much better than Eclipse. Eclipse has a lot of little UX issues like:

    - lack of smooth scrolling

    - when you scroll continuously, the line numbers don't change until you stop scrolling

    - general sluggishness

    At my day job, I worked with Eclipse for years before eventually switching to VS Code [as well as other modern editors like intellij idea and sublime text], and I'll just say I never open Eclipse unless I need to work with an old CIQ project. To me, Eclipse also sucks as a general purpose text editor (with its rigid insistence on the project/workspace paradigm) and its slow startup time.

    Even when I used Eclipse on the daily, I always had to keep a 2nd editor around like Notepad++, for certain tasks where I needed more speed / flexibility, like opening some random file unrelated to a project. I can use VS Code as a general purpose text editor for most tasks, except extreme edge cases like opening a 100 MB file. I do think Sublime Text is a lot more efficient as a text editor, but then again, it shares a lot of the same "modern text editor" sensibilities as VS Code, and is a lot closer to VS Code than it is to Eclipse.

    Also, I'll just leave this here:

    https://survey.stackoverflow.co/2024/technology#most-popular-technologies-new-collab-tools

    Yes, I know the objection will be that popularity is not necessarily an indicator of quality, but sometimes the popularity of a technology is a valid reason to use it (not the only reason, but one of the reasons). We see this with the network effect, which tbf applies more to communications tech. But the fact that VS Code is more popular means that:

    - there will be more resources to teach devs how to use it

    - there will be more useful 3rd party extensions (VS Code has a lot of great extensions and built-in features that I use regularly, which simply aren't available for Eclipse)

    - other IDEs / editors will copy VS Code (or at least have a mode which uses VS Code keybindings, for example)

    It's kind of like how VS Code copied other modern / popular editors at the time it was launched, which is why many modern editors have several things in common (e.g. CTRL-SHIFT-P to open the command palette, multiple cursors, fuzzy search)

    If you use Eclipse every day and you like it, I don't blame you for not wanting to switch. In fact, years ago, when CIQ was still on Eclipse, somebody suggested to Garmin that they should switch to VS Code. I downplayed the idea, saying that Eclipse works great for me. But that was before I used VS Code heavily for work.

    I have no idea on how to do ANYTHING in this stupid VS Code. Why on earth did you decide to torture yourself?

    I worked at a startup where everyone used VS Code or Intellij Idea. When I joined up, one of my new coworkers laughingly warned me that one of the managers previously worked on Eclipse, so I should avoid badmouthing it in front of them. To be clear I didn't mention the word "Eclipse" at all at this point.

    Says a lot to me that a new coworker assumed - without any evidence - that I would have a negative opinion of Eclipse.

    Then again I know people who like Eclipse just fine. I'm sure it's better than a lot of stuff that came before, but very few people are using older IDEs / editors than Eclipse (notepad, vim, nano and emacs are notable exceptions). Yeah, I worked with a guy who stubbornly clung to an IDE that was discontinued in the 90s, but even he admitted it was only because he was used to it.

  • The way 'documentation/guides' are written is another joke.

    I agree the docs have a *lot* of issues

  • I'm on v.1.2.2 and it does nothing like that.
    It doesn't help me write the code. Today w/the APIs being so big I can't really keep everything in mind (except for general guidance). For API docs it simply opens a browser.

    Should I upgrade the extension or something?

  • Like I said, the language features require the app to be continuously built in the background (as you make changes). So if you are having issues with extremely long builds (~3 minutes to build a Monkey C project is ridiculous), then it's unsurprising that the language features would not work.

    I'm on v.1.2.2

    I think the latest version of the Monkey C extension is 1.1.2 (that's what I'm using). (I'm guessing 1.2.2 is just a typo tho).

    I would try to fix the issue with the super long build times, and hopefully the language features will start working as well.

    To fix this issue, I guess you can try different versions of the JDK. According to the other thread, others have used 1.8.0_241 with success. Since that's a super old JDK, I would probably also try a more recent LTS version, but if 1.8.0_241 works, there's probably no harm in using it. If you need a newer JDK for other purposes, then you can install 1.8.0_241 as a non-default JDK and set the java path explicitly in the Monkey C extension settings.

  • Also, you should be on the latest version of the SDK - currently, this is 8.1.1

    The language features need SDK 8.1.0 at a minimum.

  • On an 11 year old computer I'm running Windows 11 in a VM with Oracle JDK 23 and it barely takes a minute to start the sim for a watchface with more than 3000 lines of code. Maybe you need to de-bloat your Windows?