6 ms·
I ended up uninstalling ReSharper 2 years ago because of the amount of false positives it reported as well as having huge impedance mismatches with the performa
by jeremiep 10y ago
I ended up uninstalling ReSharper 2 years ago because of the amount of false positives it reported as well as having huge impedance mismatches with the performance requirements I had at the time.
One annoying moment was when it claimed a variable would always be false, and running in the debugger proved it could have both values. I also had to turn off a lot of rules because the refactoring suggestions I had would've made the code cleaner at the cost of adding indirections or allocations.
I was doing a 2D skeletal animation system for Unity3D at the time and wanted raw performance much more than anything else. We ended up pushing 10K sprites on mobile devices (thats about 200 dynamic meshes of 50 sprites each - the best existing solutions we could find had a performance cap of 10-20 meshes) but that was the least idiomatic C# I've ever written; structs and refs everywhere in tightly packed contiguous memory with components being dumb indices into these arrays.
Its a wonderful tool, but it requires some critical thinking to not naively apply everything it suggests, which in my case ended up being easier to work without ReSharper than with it.
- Anchor 10y agoFunny coincidence, I'm tweaking performance of manually managed contiguous memory using structs and refs as I'm writing this reply (the application is a combinatorial optimization system). There's nothing in ReSharper that currently suggests me to replace structs and refs with something else, or that I need indirections into my SoAs and AoSs. But yeah, static analysis can yield false positives if you use for example reflection (one more reason to avoid it in most cases), but there's an option to turn a specific message off for particular line, class, etc. You can also edit ReSharper suggestions per solution basis, so if there are some special requirements, they can be incorporated into its behavior.
- jeremiep 10y agoIt probably improved a lot since the last time I used it. I haven't done any C# in a while :) It wasn't complaining about structs or refs but wanted LINQ everywhere, anonymous lambdas and other high level constructs in place of high-performing but harder to read ones. I wasn't using reflection either, it was something like this simplified pseudocode (off the top of my head, I haven't touched that codebase in over a year): var completed = false for each line in timeline do completed = completed || tick(line) if completed // here it complained its always false There was more to it (to handle time offsets and multipliers, disabled lines and whatnot) but thats the gist of the algorithm. After disabling or tweaking rules every day I just decided to uninstall it, and as I said its a wonderful tool - just not for that specific task at that specific point in time :)
- BoorishBears 10y agoI still say Resharper taught me Linq back when it first came out. It'd generate some abhorrent Linq statements in place of very clean, readable code, but just trying to grok what those statements meant made me so much more comfortable with it. And of course I'd always go back and undo the changes, but occasionally it'd do something that was the right balance of nifty and readable that I'd try to salvage out of the larger statement and reuse elsewhere. It's true it takes some effort to tweak it to cut down on noise from its analysis (and IntelliJ has the same issue), but I think it manages to be worth it over all (assuming you have that time and effort to contribute, which it sounds like you didn't at the time)
- Anchor 10y agoThe pseudocode is intriguing. I personally have been stumped 2 or 3 times by static code analysis, disagreeing firmly with the machine for few minutes before realizing my mistake, but it is of course possible that there have been bugs in the analysis system of R#, which might explain what you saw. Adjusting the rules and settings of R# is a daunting task, I agree. However, usually if I have special requirements for a project, I just set Inspection Severity to none for the language features I don't want to use, and that solves the issue for that project.
- eropple 10y agoMy experience with ReSharper is pretty similar, but it should be noted that we're a vanishingly small fraction of the market for ReSharper. =)