I'm not sure whether this is the right place for my question. If not, please close the thread.
I'm new to Xamarin.Forms/Mobile development. (not to .NET development in general).
Anyway, when I deploy my very basic sandbox/test app which uses Xamarin Prism (currently only 2 Views and ViewModels) to the Android Emulator, it takes about 2-3 minutes to start the app. I'm working on an Lenovo X1 Yoga (2nd GEN), with a Core i7 7300U, 8GB RAM and SSD. So I can't imagine the specs are to low. I also enabled virtualization in the BIOS.
Is the time it takes to deploy really that long?
I can't imagine how this will go once the application grows?
Is there sometihng I can try t improve the performance, or is this behaviour normal?
Kind Regards
Gilles
Related
Ive started my first a xamarin forms project. I have given up all simulators a while ago because of slow ...everything
The app performance itself is another thing, but Im talking about slow build and deploy times. This, in combination with that the app just crashes or gets a timeout when fetching the actual error is just gut-wrenching and I spend half my days waiting... ´nuff ranting right?
Are there specific project structure, for example so you can do most of your code through unit test for example? sadly the most trial and error I do has to do with gui-stuff.
I have trued Gorilla player, but it was harder that I thought to get it running, I have an open case at Gorilla-team..
Any tips to avoiding build->deploy to device is veeeee...extremely welcome.
Since I don't know your hardware setup I am going to propose different solutions. Maybe one of them might help.
Pick the platform that runs the fastest. When developing on a Windows machine, then probably the UWP project builds the fastest (since you cut out the Mac in the daisy build chain).
When using an Android simulator make sure to fully use hardware acceleration Making the Android emulator run faster
Visual studio for Mac beats its Windows counterpart hands down when it come to build times in my experience. I gave up on developing XF Apps on Windows since I was having countless build issues and some builds took forever. The situation improved dramatically when moving to a Mac.
Maybe you could also try using the Live Player which should give you immediate feedback when it comes to you UI https://learn.microsoft.com/en-us/xamarin/tools/live-player/
Adding unit tests might also speed up things considerably. NUnit is a pretty popular framework.
Another answer mentions that building to UWP is fastest, but I don't target UWP ever so I wouldn't know about that. I just do iOS and Android. Android is faster. We also have the question of simulator/emulator vs real devices. Of the full gamut of options out there to run the app, I've found that building to a physical Android device is the fastest way to build/run.
You could also check the project properties to make sure you have all optimizations set up for that, such as (for Android in particular):
Use Shared Runtime
Use Fast Deployment
Linking: None
DISABLE ProGuard
Aside from building all the way to a phone every time to test things, setting up your project for unit testing that incorporates mocks can also get you going faster. That would typically involve dependency injection and a unit testing framework. I have a Xamarin.Forms app that does just that on Github if you want to see how to do that.
Using Visual Studio Community 2017 and Xamarin Forms.
May be this a possible duplicate question. But Believe me I have tried almost all options as much as possible.
I tried following best even with solutions provided:-
1. armeabi-v7a processor. But still it gets about 30+ minutes to reach delpoy and no resolution even after that.
2. Installing HAXM gives error as Virtualization Enabled In Firmware: is No
3. I tried running many times without Hardware Acceleration but then it is as if a endless going on process, for half an hour to hour and still not reaching actual delpoy.
4. Windows Live Player is not working. With lot of search on google found it has in-built-bugs still.
All the searched posts are major around 1-2 years back which I saw. So my question is that is there any resolution for this issue is found. Which even takes 15 minutes to deploy but gives me running my app on android emulator?
Thank you very much in advance.
Please note:- I have attached images for more clarification.
1. systeminfo
2. My Laptop Properties
3. Android Device Added
Did you enable Vt-x in your system BIOS?
I am working on one project which is a standalone javafx application. It will run 24*7*365 days continuously.
So, i have a question in mind.
which things we need to consider for running this application smoothly and with high performance for 24*7*365?
Please guides me sir, regarding it.
Details for used things are as follows for Reference :-
Used java version :- 1.8.0_121
Available Ram :- 2GB
Allocated Memory for application :- -Xmx1524M
Hardware Configuration :- Processor - Intel Atom CPUD425# 1.80GHz x 2
OS :- 32 Bit Fedora 15
I will probably state the obvious here, but OutOfMemory errors are the main thing you should worry about. A small glitch in your code/program could make your app die fast or run extremely slow under memory pressure.
I would say that you need to enable garbage collection logs and monitor those. Also is there a way for a javafx app to actually use another instance if the current one is facing issues? There are tools for that under different apps, but not sure about javafx... I mean can you automatically shut down (and collect heap data) the current running application and automatically start a new one (so that later you can analyze what actually happened)? It might not be feasible, and if it's not, you should have enough stress tests before you actually lunch it into production.
One thing you should check first is whether your system suffers from the notorious memory problems that some Linux graphics drivers have. See for example my answer to this question here on SO:
Javafx growing memory usage when drawing image
When I make a change to Javascript file and save it, it takes over 5 seconds to build and restart the development server even if it is simple 10 line example app. I am new to Meteor.js so I don't know if it's normal, but I though changes should appear instantly (about a second or two) on a browser? 5-6 seconds feels pretty long time for me.
Selecting package versions and downloading packages seem to take the major part of the time.
There is one websocket pending (Chrome Dev tools Network tab) when it's restarting. I'm using Meteor 1.0.
That's a known problem they're working on. You can read about it and follow the progress in issue #2846.
There is a new issue about this: https://github.com/meteor/meteor/issues/4284
Upgrading to a pre-release of 1.3 seems one of the best options right now:
meteor update --release METEOR#1.3-modules-beta.8
And upgrading to 1.3 when it comes out (should come around march-april 2016).
Quick measurements to get a rough idea:
BryanARivera says on the thread that updating to 1.3-modules-beta.8 gets him From 6-10s to 1-2s.
I tried on the https://github.com/wekan/wekan project by changing a view component (on an early-2013 mbp with SSD):
with `METEOR#1.2.1` ~10s to reload
with `METEOR#1.2.2-faster-rebuilds.0` ~5s to reload
with `METEOR#1.3-modules-beta.8` ~4s to reload
This was my purely hardware solution to the problem of slow Meteor build times.
When I decided to get into development I was adamant that I wasn't going to run out and buy the latest and greatest in hardware until I actually knew how to code and knew what my requirements were in the long term.
So I went out and bought a used 15" Acer laptop; it had the following spec:
Memory: 6Gb RAM
Processor: Intel Pentium CPu 6200 # 2.13GHz *2
OS: Ubuntu 16.04.1 LTS 32-bit
Storage: 153.5GB HDD
With this setup I saw rebuild times of between 15s ~ 30s (including the browser refresh) of a side project using Meteor 1.4, Reactand a Mongo db instance with around 1500 records. I found these times to be excruciatingly slow when it came to making multiple changes. You can see the initial version of the project I was working on herehere.
After trying to get work done in cafe's and libraries I realised that I was much happier working at home, and once the side project was complete I decided I would reward myself with an upgrade.
My initial choices were between a Macbook Pro and a gaming PC such as the Asus ROG, but since the former are very expensive and the later's graphics abilities were of no use to me (I'm not a gamer) I ruled them both out. These being quality machines, when I compared them against reviews of other PC's and laptops I noticed that where other systems scored higher in performance, they were lower in build quality and vice versa and there was no overall winner that had me sold.
I decided, a self build was in order and that it would be great if I could fit it all into a mini-ITX board and case. My requirements became:
An SSD drive (faster read/write times than a HDD)
Ubuntu: On account of it being free and faster that MacOS
Mini-ITX: so that it can unobtrusively fit onto my desk
Quite
16Gb DDR4 RAM: this seems the bare minimum for development.
After some searching I came across these instructions for a $682 Skylake Mac Mini Hackintosh Build, which formed the basis of my build.
As I currently have no intention of working with MacOS, as per the Hackintosh instructions, I did not change the Wifi card.
My new spec list along with what I paid for each item were as follows:
Intel Core i7 Quad-Core i7-6700 3.4GHz Processor £279.97
Crucial Ballistix Sport 16 GB kit (8 GB x 2) DDR4 2400MT/s UDIMM 288-Pin Memory £121.00
Samsung 850 Pro 250GB SSD £121.00
Gigabyte H-170 Motherboard £109.00
Noctua NH-L9i CPU Cooler £35.00
External PicoPSU Power Brick £24.00
MiniBox 160W PicoPSU £40.00
Streacom F1C-WS £90.00
Noctua NF-A4x10 FLX £10.99
Making a total spend of £830 (correct at time of writing).
The case comes in two finishes; black and silver, I went with the former to keep my monitor my main point of focus on my desk. It took me about an hour as a newbie to put it all together. I imagine it would be much faster if I did this for living.
Pros:
My rebuild times were drastically reduced to only 2s using Meteor 1.4.
The PC as a whole takes only 15 seconds to boot up whereas the laptop could take as long as 2 minutes.
With the laptop, a Meteor reload would fully load the CPU whereas with the PC the 4 cores barley rose above a few percent, as viewed from the System Monitor tool.
It has a footprint of 19cm x 19cm making which is smaller than my laptop.
It was super quite, the fans were barley noticeable on most days.
Cons:
The draw back of such a small case is that there is no room for a graphics card should I want to start gaming in the future.
All the ports are at the rear. However, this does give the front a clean look.
There is no reset button but the power switch can be configured via the bios to act as a "soft" switch such that, pressing it brings up a dialogue giving you the option to restart/suspend/shutdown.
Conclusion:
Overall I am very happy with the choice of components I made and the money I saved by self-building.The PC is powerful enough for video editing and I am working towards editing my first Youtube tutorials.
Being more wise about my needs means that I am now using Docker to create isolated development environments to prevent software conflicts which in themselves can chew up time in resolving.
The component research I did means that I am aware of the massive progress that PC cases, coolers, cables, memory cards, fans have made since I left college. You can now build something not only small and powerful but also attractive with options like tempered glass, liquid coolers, custom braided cables, case strobe lighting and shaped cases.
I have Visual Studio 2010 and a pretty large web application project running on IIS 7. Startup for the web application is over a minute (75 seconds). I've attached ANTS to it and very little of the 75 seconds is my code. Most of it seems to be something like CreateAppDomainWithHostingEnvironment and BuildManager stuff. Now I know that ASP .NET will compile dynamically the first time but I certainly don't expect it to compile for that long. Why could I be experiencing this problem and what are some ways I can try to fix it or try to better understand what is taking so much time. Aksi the CPU utilization doesn't seem to be that high. I have an awesome machine.
The problem with the 75 second startup is that for developers working on this, everytime they make a change they have to wait this 75 seconds.
I am using .NET 4.0
EDIT
I ran Microsoft Network Monitor on my machine to see if there was anything suspicious going on the network. There wasn't as far as I can tell though i wasn't sure what to look for (I am familiar with network monitor though so I did have an idea of what I was doing). I tried to run it in release build and though it may have improved the performance a little bit its not really significant
EDIT
I have SQL Session state. As far as i can tell, the connection string is pointing local. For some reasons though, when examinning ANTS, i'm getting a lot PollLockedSessionCallback on many threads. The function seems to be called over 70 times. Does this help at all?
Try building the application in release mode. You can set this in the Build tab of the properties window. You might also consider pre-compiling when publishing the application before deployment.
Are you trying to access anything via a network share at startup? If so, bring those resources local for startup comparison.