Hacker News new | ask | show | jobs
by Timon3 1075 days ago
When I used this plugin in CLion to work on Rust projects it felt very sluggish to me (I had to re-execute Cargo commands to get it to pick up on new files etc., and autocomplete basically didn't work). Has this been fixed, or was it some error on my end?
9 comments

There's a project setting for running linting tools on the fly rather than when invoking actions. These will do stuff like lint and refresh stuff as you type, but it adds latency and other weird jitters if the tools take longer than expected to finish execution. This is indicated next to the checkbox that enables the setting.

I usually turn the setting on, but there are a few projects that do make the UI sluggish where u have to turn them off. I'm not entirely sure what the problem is, some code with many dependencies works absolutely fine while some code with only basic crates turns into a lagfest. My suspicion is that there's a crate somewhere deep down the dependency tree that makes use of some very intensive macros that trip up the tooling.

I've also noticed that the most recent release of Rust made working with the tooling feel a lot snappier. Not sure what changed, but it's nice to see.

One laat thing I always recommend anyone running into weird IntelliJ/Clion/IDE slowdowns: check the difference between antivirus off/on to see if that influences things. Windows Defender just can't seem to deal with a program opening many small files. What this means for you depends (you probably shouldn't disable AV on a company laptop) but it may solve the mystery why your experience doesn't match other people's.

Interesting. I just updated CLion and I got a notification that "Cargo Check on the fly analysis is turned OFF". So the setting is in Languages & Frameworks > Rust > External Linters.
I have been using this for a while and don't have to do much. It automatically reloads for me. My only gripe is that it won't allow me to right-click and automatically create a use statement for Derive macros. But I may be spoiled by switching back and forth between Kotlin and Rust.
I stand corrected, looks like that has been resolved in the latest version of CLion, with the Rust plugin.
I personally haven't experienced that issue, but in my experience IntelliJ IDEs can offer a different experience per environment based on your Java and filesystem settings.

Especially if you happen to be doing anything like using WSL or a mounted network share. For example, I had to do a lot of workarounds to resolve indexing and line ending issues while working on a Windows machine and running my code on a remote container server running nix.

I've not had that experience personally, and I've used CLion with the rust plugin for quite a while.
The plug-in itself is fine now, but linting through cargo check is frustratingly sluggish especially in repos with nontrivial Diesel codegen. Like noted in a sibling comment, it’s turned off by default and you get a notification suggesting you turn it off (uess you turn off the notification).
It’s improved a lot the last year. Check it out again
> I had to re-execute Cargo commands to get it to pick up on new files etc.

This hasn't been fixed, but it's my biggest pain point.

> felt very sluggish to me

We're working in a Rust workspace monorepo with about 30 crates and it feels fast.

What kind of system? IntelliJ has always seemed to require a lot of resources.

I bought 16GB a decade ago, for example, so I wouldn’t have swapping issues with my tools. That machine is still usable today.

Every HN intellij thread:

"Its sooo slow"

I am not sure why people use these tools, I've tried and they seem at best on-par, at worse, sooo much worse. I get real Microsoft vibes, a sales team comes in, takes the purchasing team to a concert/sports and dinner to 'discuss business'. And its announced that everything needs to be done on M$ sharepoint/Intellij.

If you just "tried it", I doubt you'd seen even one percent of what they can do. I've been using IDEA for years and still learn new tricks every few days. The performance is atrocious, the well known bugs (like constantly losing caches) have been there for years, but I suffer through it because of the functionality.
I've never been wined and dined by Intellij. I just find their product very comfortable. It's always "just worked" out of the box for me. VS code I've tried a few times and it always takes a bunch of fiddling.

Less feature-ful text editors like sublime and vim just don't do it for me.

What language, and kind of project do you work on? And what other tools have you compared to IntelliJ in your workflow that are better, or so much better?
I'm very happy with the Jetbrains tools, and have been happy for years. The other tools aren't slow for me, only CLion with Rust.