Visual studio slow down Mac

55733525573352 USMember ✭✭

Visual studio takes 100, 200 or more percentage of CPU. New projects in solution are being created very slowly (2 minutes or more).

Visual Studio for Mac Preview, Version: Preview 5 (7.0 build 1659).
MacBook Pro, Intel Core i5 (2.6 GHz), Memory: 8 GB.

Answers

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @5573352

    There is a bug report about this:
    https://bugzilla.xamarin.com/show_bug.cgi?id=52995

    And a fix that seems to be working:
    https://bugzilla.xamarin.com/show_bug.cgi?id=52995#c2

    can you try one thing with and that is to delete the following directory

    ~/.ServiceHub

    if that makes no change, try also deleting

    ~/.IdentityService
    Those are hidden folders in your home directory. Easiest way to delete them is to open Terminal and enter the commands:
    rm -rf ~/.ServiceHub
    rm -rf ~/.IdentityService

  • 55733525573352 USMember ✭✭

    You are not authorized to access bug #52995.

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai
    edited April 2017

    @5573352

    Sorry, I failed to notice that the bug was filed as a private bug. But the steps I noted were the same as in the comment with the fix that I linked. Did you try deleting those folders as noted in my last post?

    And there is a duplicate public big report as well: https://bugzilla.xamarin.com/show_bug.cgi?id=53838

  • TomSoderlingTomSoderling USUniversity ✭✭✭

    I've got the lag bad as well. Doesn't seem to be tied to the CPU usage for me tho - sometimes its 150%, other times it's down to 5% but the IDE responsiveness is still really laggy either way.
    I've deleted the folders, restarted - no dice.

  • MichaelThwaiteMichaelThwaite USMember ✭✭
    edited April 2017

    I see the same - it appears to be linked to Source Code Analysis.

    Any document more than a page in length is very slow to scroll and editing can lag seconds between keystrokes. Restarting VS4M or XS reliefs the issue a little. Deleting those files didn't seem to have an effect. Switching off Source analysis really helps, returning performance to something seemingly normal.

    Is there a way to have source code analysis take. aback seat? I see that changes made following its suggestions can take minutes to be acknowledged.

  • PatrickSaysPatrickSays USUniversity
    edited May 2017

    I've had huge problems with the current stable XS - IntelliSense turning on and off arbitrarily, crashing when renaming files or folders, files missing at random when building.
    So I decided to give VS for Mac a go. I have the exact same problem with VS lag when I'm editing and scrolling. A little less with when Source Code Analysis is off, but still unbearable. Also, no dice deleting those folders.
    I did a little test, having both IDEs open and idle at the same time. Both being the newest stable.
    But hot damn, VS is hogging a whopping 150% of CPU in an idle state, where as XS is typically around 0-1% CPU.

    Anywho, I guess the occasional crash and missing files are preferable to lag. Although I'd love a fix for either.

    Rant over - back to work. :)


    (VS Preview 10, V7 build 3051)
    (XS Community V6.3 build 863)

    EDIT:
    Grammar.

  • voidvoid DKBeta ✭✭✭

    Not to worry. I've heard Xamarin will release an interface to https://dk.pinterest.com/pin/327636941622233919/ when VSfM launches :)

  • ellipticalwebellipticalweb USMember ✭✭

    Yep, VSFM alpha channel preview updates w/ bug fixes mitigated by steadily worse IDE performance. Preview 10 is particularly bad. "Unusable" bad w/o turning off source code analysis.

  • JesusGarza.9411JesusGarza.9411 MXMember ✭✭

    I agree, Visual Studio for Mac is really slow with the latest update. Unbearable, unusable.
    VS Preview 10 (7 build 3051)

  • borrelborrel USMember ✭✭

    When will VS be updated? It's unusable at the moment.

  • FullEnglishFullEnglish GBMember ✭✭

    This product is going backwards at a rate of knots.

  • ellipticalwebellipticalweb USMember ✭✭

    Tentatively speaking, the release update seems to have improved performance, even with source code analysis turned back on. But I did toggle the channel back to stable.

  • NamDuongNamDuong USMember

    7.0 Build 3146

    The program is very slow/lag when typing. I am using a mac book pro 15" 2015 quad core i7. Very laggy and slow.

    Constantly crashed when refactoring code (renaming vars).

    Using with Unity, after adding a new MonoBehaviour class, it stops recognising all user defined classes.

    Using with Unity, right click -> Add new file only allow me to add a MonoBehaviour. How about other normal files?

    Right click -> Quick fix menu doesn't work on an event name when you select the whole event name.

    Please don't tell me to go and report bugs. It takes a day to report all the bugs.

  • PrullebakPrullebak NLMember ✭✭

    @NamDuong same issue here. Typing is very laggy and slow..

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    Bugzilla cross-reference

    Public bug to track lag when source analysis is enabled:

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    @NamDuong @Prullebak
    Could you check whether source analysis is enabled under Visual Studio > Preferences > Text Editor? Earlier commenters mentioned that disabling it helped, and I'd be interested in knowing how that might play into the laggy behavior you're seeing. Thanks!

  • PrullebakPrullebak NLMember ✭✭

    @AshleyGazich Much better! Thanks

  • vitaexmachinavitaexmachina Member ✭✭

    Even in mid-2018, I had to turn off source analysis. My highly specc'd mac was a constant flame throwing oven, nearly melted a hole though my desk, and was unusable!

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    @vitaexmachina I'd like to learn more about this. Could you please file an issue through Visual Studio for Mac > Help > Report a Problem and include as much of the following as possible?

    1. Logs from Help > Open Log Directory
    2. Output of Help > Diagnostics > Profile for 5 seconds (taken during unresponsiveness/lag)
    3. A complete minimized test case demonstrating the issue & steps to reproduce (if possible)
    4. Whether the behavior appears limited to a specific project, and type of project affected
    5. Full version details from Visual Studio > About Visual Studio > Show Details > Copy Information [button]

    Our engineering team will be able to pick up the discussion there. Thank you!

  • ShawnCastrianniShawnCastrianni USBeta ✭✭✭

    Same thing for me. The latest version 7.5.3.7 is VERY SLOW. the longer I use it, the slower it gets such that when I hit ".", it can take 15 seconds for the intellisense window to pop up. And when it is working fast, intellisense always takes 2 tries. The first time, the window pops up with no useful suggestions. I wait a few seconds and the second time I bring it up, it contains the correct suggestions. And sometimes, no matter how long I wait, it never contains the correct "using" suggestions and I have to manually type the using.

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    @ShawnCastrianni Visual Studio for Mac version 7.6 preview contains fixes that should help with some of the behavior you're seeing. If you have a chance to give that a try and find that problems persist, we'd like to dig in further on a Developer Community thread (Help > Report a Problem). Anything you can provide in the ways of details for investigation would be much appreciated.

  • vitaexmachinavitaexmachina Member ✭✭

    @AshleyGazich said:
    @ShawnCastrianni Visual Studio for Mac version 7.6 preview contains fixes that should help with some of the behavior you're seeing. If you have a chance to give that a try and find that problems persist, we'd like to dig in further on a Developer Community thread (Help > Report a Problem). Anything you can provide in the ways of details for investigation would be much appreciated.

    Thanks Ashley. I've been working along OK - but also note that I have to restart several times during the day. The CPU is running hot, but interestingly, the UI is still very unresponsive (even simple copy and past commands have 0.5 to 1 second delays). Moreover, it's OK at first, then gets slower and slower. Particularly with large code files (I code all my Forms code in c#, no xaml). So functions such as intellisense can sometimes take many seconds for it to figure out what class you're dealing with.

    I'll be sure to take a look at the preview. Thanks!

  • vitaexmachinavitaexmachina Member ✭✭

    @ShawnCastrianni said:
    Same thing for me. The latest version 7.5.3.7 is VERY SLOW. the longer I use it, the slower it gets such that when I hit ".", it can take 15 seconds for the intellisense window to pop up. And when it is working fast, intellisense always takes 2 tries. The first time, the window pops up with no useful suggestions. I wait a few seconds and the second time I bring it up, it contains the correct suggestions. And sometimes, no matter how long I wait, it never contains the correct "using" suggestions and I have to manually type the using.

    Same here. Exactly the same behaviour. Many restarts are the only way.

  • PrullebakPrullebak NLMember ✭✭

    Here to, since version 7.5.3 (build 7) very slow performance.. I'm running on MacOS Sierra 10.12.6

  • vitaexmachinavitaexmachina Member ✭✭

    7.5.3 (build 7) - Even further news based on my experience after coding for about 6 hours straight.

    If things slow down, save all your files and close all the editor windows. When you open the editor back up, things are fast again (you don't need to exit and restart VS)

  • ShawnCastrianniShawnCastrianni USBeta ✭✭✭
    edited July 2018
    @AshleyGazich i am trying the preview version and things seem better. Still playing with it.

    However, I noticed a new bug in the preview. Normally I make a change to a source file and then click the run button. Vs for Mac normally saves any unsaved changes, performs a build and then starts the debug session. The preview version skips the build step so it only saves any unsaved files and starts a debug session. Therefore, I am debugging old code!!
  • ShawnCastrianniShawnCastrianni USBeta ✭✭✭

    @AshleyGazich I just upgraded to the 2003 preview build. The intellisense still seems good. The bug about not auto-building when I click run button with unsaved files is fixed. The toggle line comment weirdness that I did not report is fixed.

    However, I am see 100% CPU usage when idle a lot of times.

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    @ShawnCastrianni I filed High CPU usage viewing "Search in Solution" results, UI delays and unresponsiveness because I was able to locally hit CPU spikes >100% - feel free to comment on and follow the issue, if you like. The cause for my repro may be different from whatever's triggering the behavior you are seeing, but I wanted to let you know that there is at least one tracker now.

    For easy reference in case others swing by the thread, I'll also link another issue we're investigating: High memory usage [VS for MAC]

  • ShawnCastrianniShawnCastrianni USBeta ✭✭✭

    @AshleyGazich I am still on build 2003 and I found another issue. Sometimes my build fails with bogus errors:

    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G9670B7AD: expected identifier (G9670B7AD) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G56D045A6: expected identifier or '(' (G56D045A6) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G9670B7AD: expected identifier (G9670B7AD) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G56D045A6: expected identifier or '(' (G56D045A6) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G9670B7AD: expected identifier (G9670B7AD) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G56D045A6: expected identifier or '(' (G56D045A6) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G9670B7AD: expected identifier (G9670B7AD) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G56D045A6: expected identifier or '(' (G56D045A6) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G9670B7AD: expected identifier (G9670B7AD) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(13,13): Error G56D045A6: expected identifier or '(' (G56D045A6) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(12,12): Error G13DA7946: use of undeclared identifier 'class' (G13DA7946) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(12,12): Error G13DA7946: use of undeclared identifier 'class' (G13DA7946) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(12,12): Error G13DA7946: use of undeclared identifier 'class' (G13DA7946) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(12,12): Error G13DA7946: use of undeclared identifier 'class' (G13DA7946) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(12,12): Error G13DA7946: use of undeclared identifier 'class' (G13DA7946) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(12,12): Error G13DA7946: use of undeclared identifier 'class' (G13DA7946) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(12,12): Error G13DA7946: use of undeclared identifier 'class' (G13DA7946) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(12,12): Error G13DA7946: use of undeclared identifier 'class' (G13DA7946) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-11.4/mtouch-cache/reference.m(12,12): Error G13DA7946: use of undeclared identifier 'class' (G13DA7946) (FDCapture.iOS)
    /TFS/Mobile/Applications/FDCapture/FDCapture.iOS/MTOUCH: Error: too many errors emitted, stopping now [-ferror-limit=] (FDCapture.iOS) fatal
    

    and when I double click on one of them, it takes me to the reference.m file with stuff like this:

    #import <Foundation/Foundation.h>
    extern void * xamarin_timezone_get_names;
    extern void * xamarin_timezone_get_data;
    extern void * xamarin_GetFolderPath;
    extern void * xamarin_log;
    extern void * xamarin_get_locale_country_code;
    @interface  : NSObject @end    //expected identifier (G9670B7AD)
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    @interface  : NSObject @end
    

    I then have to perform a full rebuild and everything works normally for a little while. But then maybe after 10 or so more incremental builds (just typing Cmd+B), it fails again. Then I repeat the process with a full rebuild.

Sign In or Register to comment.