AndroidDesignerHost really using CPU...

RodBarnesRodBarnes USMember ✭✭

The process "AndroidDesignerHost" is constantly using +50% of CPU on my Macbook Pro. Anyone else experiencing this?

Best Answers

  • RodBarnesRodBarnes US ✭✭
    Accepted Answer

    I've not seen this behavior again so I guess we mark this anomalous and I'll report a bug on it if it happens again and I can get more definitive info.

  • RodBarnesRodBarnes US ✭✭
    Accepted Answer

    Sure enough, as soon as I posted that, it happened again. I created Bug 55475

Answers

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

    @RodBarnes

    I am not seeing any unusually high CPU usage for AndroidDesignerHost process. Are you getting this when opening any layout file or just a specific one? Also which IDE are you using, Xamarin Studio or Visual Studio for Mac? Can you share your version info, and possibly a layout file if you are only see this with particular layout files?

  • RodBarnesRodBarnes USMember ✭✭

    Xamarin Studio for Mac -- version information at bottom. I only began noticing this yesterday while working on a solution. I noted the fan had been on for a long time, checked with Activity Monitor, noticed the CPU usage. I closed the solution and AndroidDesignerHost continued to run. I closed XS and it went away. I re-opened XS and I think it fired up right away before I even opened the solution again -- though I cannot be positive about that -- and was using the same amount of CPU.

    I just opened XS first time this morning -- didn't see it running. Opened the solution -- didn't see it running. Changed to the tab with the XAML with preview showing, and it appeared but is not using excessive CPU. Rebuild the solution and still no change in CPU usage.

    Maybe an anomaly? I'll monitor this, see if it happens again, and try to determine what may've led to it.

    === Xamarin Studio Enterprise ===

    Version 6.3 (build 863)
    Installation UUID: ab2f5c76-008d-44e3-aede-3d51b5831108
    Runtime:
    Mono 4.8.1 (mono-4.8.0-branch/22a39d7) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 408010000
    

    === NuGet ===

    Version: 3.5.0.0

    === Xamarin.Profiler ===

    '/Applications/Xamarin Profiler.app' not found

    === Xamarin.Android ===

    Version: 7.2.0.7 (Visual Studio Enterprise)
    Android SDK: /Users/barnesr/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
    4.0.3 (API level 15)
    4.4 (API level 19)
    5.1 (API level 22)
    6.0 (API level 23)
    7.0 (API level 24)
    7.1 (API level 25)

    SDK Tools Version: 25.2.5
    SDK Platform Tools Version: 25.0.4
    SDK Build Tools Version: 25.0.2

    Java SDK: /usr
    java version "1.8.0_101"
    Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

    Android Designer EPL code available here:
    https://github.com/xamarin/AndroidDesigner.EPL

    === Apple Developer Tools ===

    Xcode 8.2.1 (11766.1)
    Build 8C1002

    === Xamarin.iOS ===

    Version: 10.8.0.175 (Visual Studio Enterprise)
    Hash: a04678c2
    Branch: d15-1
    Build date: 2017-03-28 14:05:38-0400

    === Xamarin.Mac ===

    Version: 3.2.0.175 (Visual Studio Enterprise)

    === Xamarin Inspector ===

    Not Installed

    === Build Information ===

    Release ID: 603000863
    Git revision: a2163670efe259c85cd8f335d95b175068fbbe2a
    Build date: 2017-04-03 14:33:15-04
    Xamarin addins: 2045d688ea1420e0381b473360ca62a763eb7d04
    Build lane: monodevelop-lion-d15-1

    === Operating System ===

    Mac OS X 10.11.6
    Darwin por-barnesr-m3.ds.ad.adp.com 15.6.0 Darwin Kernel Version 15.6.0
    Fri Feb 17 10:21:18 PST 2017
    root:xnu-3248.60.11.4.1~1/RELEASE_X86_64 x86_64

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

    @RodBarnes said:

    Maybe an anomaly? I'll monitor this, see if it happens again, and try to determine what may've led to it.

    Thanks.

    In my test I used an Android project. Did this occur with a Forms solution when previewing a Forms XAML file, or with an Android project (non-forms) when using the designer for a Android .axml layout file?

  • RodBarnesRodBarnes USMember ✭✭

    This is a Xamarin.Forms solution. Yesterday, I was mostly working with and deploying to an Android phone (Samsung S7) and made several changes to the XAML.

    Today, I did one Android deployment to the phone and the balance as been using the iOS simulator. While I've seen the AndroidDesignerHost CPU peak to +50% briefly following a "Rebuild All", I have not seen the behavior I experienced yesterday where it "hung" at a high percentage.

    So, maybe an anomaly or maybe more related to repeated working with the Android or with significant changes to the XAML.

    Is AndroidDesignerHost the process that hosts the preview? Or...? If I knew more about what it did I could better focus my testing efforts.

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

    Yes, I believe AndroidDesignerHost is the process that creates the preview. At least in the android test project I used yesterday that process only started when I opened the .axml layout file, and it closed when I closed it. Forms may be different as it gets more complicated. First the Forms XAML has to be translated into something that android can work with so the preview can be shown for Android.

  • RodBarnesRodBarnes USMember ✭✭

    It is happening again. I have been working exclusively with the iOS simulator since my last reply -- no Android at all other than the project being built as part of the solution. No changes to the XAML, no display of the preview, just working in the VM on business logic. AndroidDesignerHost is sitting at +56% and I'm doing nothing at the moment in XS.

    I realized a moment ago that my fan had been on for a while but hadn't thought to check why -- too focused on coding. :-(

    Closed the solution and no change.
    Closed the iOS simulator and no change (didn't think there would be).
    Closed XS and no change.
    Quit XS and AndroidDesignerHost disappeared.
    Opened XS and no AndroidDesignerHost process showing.
    Loaded the solution and AndroidDesignerHost process is showing. Initially showed some CPU but back to near-zero.
    Did "Rebuild All" and AndroidDesignerHost process showed peaks of CPU usage but goes back to near-zero.
    Ran app (on iOS simulator), and AndroidDesignerHost shows still near-zero.

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

    Thanks for the info. I am not able to reproduce this issue.

    Did you have a Forms XAML file open at all when seeing this again? To see if this issue is specific to a certain project, can you see if the same happens with a different Forms solution? You said you were "working in the VM." Is your mac a VM? If so, is it running on PC or mac hardware? Can you give some more info on your setup?

  • RodBarnesRodBarnes USMember ✭✭

    [Dang, accidentally clicked on the "Yes" to make that the answer. Obviously it is not. :-) Can you undo that?]

    Sorry, VM = ViewModel. The XAML module was open but it was not in view, only the ViewModel was. I'll try today having the XAML closed and see if it makes and difference. I will also try working in another Forms solution to see if I experience the same behavior.

    My setup is pretty well identified in the details I sent previously from Xamarin Studio. If you need something else specific that isn't in that, please let me know.

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

    @RodBarnes

    Doh... VM = View Model of course. :-) Thinking you were using a Virtual Machine was why I asked for more info on setup.

  • RodBarnesRodBarnes USMember ✭✭
    Accepted Answer

    I've not seen this behavior again so I guess we mark this anomalous and I'll report a bug on it if it happens again and I can get more definitive info.

  • RodBarnesRodBarnes USMember ✭✭
    Accepted Answer

    Sure enough, as soon as I posted that, it happened again. I created Bug 55475

  • RodBarnesRodBarnes USMember ✭✭
    edited May 2017

    @JGoldberger - I have had zero response on the bug I opened. I continue to have this happen on a regular basis. I have uploaded several IDE logs. I see that it has been assigned.

    What do I do to get someone's attention on this? You can cook hotdogs on my Mac back panel...

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

    @RodBarnes said:
    I have had zero response on the bug I opened. I continue to have this happen on a regular basis. I have uploaded several IDE logs. I see that it has been assigned.

    What do I do to get someone's attention on this? You can cook hotdogs on my Mac back panel...

    Offer some of those fine hot dogs as a reward for fixing this bug? (KIDDING!)

    We can never guarantee when a bug will be addressed. The engineering teams triage the bugs based on a number of factors including but not limited to number of affected users, how seriously the bug affects being able to work, etc., etc. You only posted this bug yesterday so I would give it a bit of time.

    In the meantime, we are encouraging all users to move to Visual Studio for Mac if possible. Visual Studio for Mac is basically a rebranded Xamarin Studio with some additional features, like being able to do ASP.NET app projects. If possible can you see if the issue persists using Visual Studio for Mac? You can download it here.

  • RodBarnesRodBarnes USMember ✭✭
    edited May 2017

    @JGoldberger - Actually, I originally posted 55475 on April 21st, a month a ago. But your point is well taken -- 'been doing this for 30+ years so I certainly understand that not all bugs can be replicated, addressed, etc.

    I upgraded to VS4Mac when it became available. If anything, the problem is significantly worse than with XS. At least, based upon the last couple of days.

    Is there any point in continuing to attach IDE logs? Or just live with it for now?

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

    @RodBarnes

    Oh, sorry, I misread the date of the bug report's filing. But yeah, if it can't be reproduced it is of course more difficult to address.

    I would say no need to supply more logs unless some behavior changes.

  • JustinTothJustinToth USMember ✭✭

    AndroidDesignerHost really is a hog, it's using 6gb of my RAM at the moment, and I don't even use the designer. There really should be a way to disable designer view and use purely the xml editor...

Sign In or Register to comment.