my apps startup time became extremely slow. I end up 15 secs here and I profiled using Xamarin Profiler on VS 2017 enterprise. Here is how it looks like
This is the slowest line shown in the profiler but I dont really understand what it tells me? there is not method or class name.
Most interesting thing is entire MainActivity with App initialization takes around 800ms as shown below with red lines highlighted.
So my questions are what consumes in the screenshot1? how/what am I supposed to optimize if my mainactivity completes in 800ms?
I went deeper down and analyzed almost each line how fast they are executed. below are the nuget packages I am using. You need to initiliaze all these within mainactivity on create method. some are slow. Like I was using xamarin insights although it is deprecated for hockeyapp(Hockeyapp and mobile center still dont have custom exception tracking. thats why I was keen to keep xamarin insights until they get this feature). So I removed it and I removed xamarin Light theme. I am now down to 5-6 secs. It would be great to have 2-3secs of course but this is still something :) I hope this helps to others who has problem with startup time.
Xamarin.forms Light theme takes 1.1 secs to initialize as shown below
Acr.userdialogs is fine.
MobileAds.Initialize
HockeyApp
FFImageLoading
Xamarin Inisghts
Xamarin.Forms.Applink
Related
We have builds of our application for mac and window with the Electron framework. And a lot of our users complain that the application sometimes hangs and becomes unresponsive. The Sentry monitoring shows that we have a lot of reports about that app become unresponsive and a lot of users with that problem. But when the app runs in the native browser, like Google Chrome, it doesn't happen.
Electron version 8.5.1 - this is the last 8.x version now. We can't move on the higher version, because there are some critical things that work correctly only on this one. This one for example - https://github.com/electron/electron/issues/24384 (It's closed but still not working).
Investigation of the Sentry logs didn't help us to understand what's the root of the cause. It happens at different times and we didn't find what it might depend on.
Just a senrty log example:
We made a workaround that helps to reload the application window.
window.on('unresponsive', () => {
// there we can destroy window and create new
});
but it doesn't solve the root of the cause.
Could someone help to solve it or why can it be happening? Maybe someone has the same problems?
I've spent the better part of about forty eight hours dealing with this issue. I've read all that is said about it on this forum. (Which isn't much.) And I've read all about it elsewhere. And I still have not found a solution.The problem.
It's simple. My project builds successfully. When I start the debugger, I get the endless blue loading circle. It never launches into the browser.
If you know what the issue is, please do share I would be grateful.
Thanks,
CM
For the record, what worked for me, was running my program in a terminal. Completely bipassed Visual Studio's buggy UI.
I don't know what caused the infinite blue loading circle.
And I don't care.
I'm moving on.
Thanks,
CM
Short version:
When I debug ASP.NET MVC apps in VS2013 and try to edit razor views or css files, the CPU usage of devenv.exe skyrockets to the point where VS becomes unresponsive. Browser link is turned off, yet this still happens. Restarting debugging doesn't help, restarting VS doesn't help, restarting windows helps only for a short while, before the problem shows up again. How do I fix this?
Long version:
I'm having some trouble with Visual Studio 2013. Namely, after I start debugging an ASP.NET MVC app devenv.exe starts hogging CPU (to the point where Visual Studio becomes unresponsive). Some time ago this was happening only from time to time, but now it happens nearly always.
At first I thought that it was a problem with Browser Link, but the problem didn't go away after I turned it off and closing the browser while debugging doesn't have any effect.
Stopping debugging makes it stop hogging CPU, but it doesn't make the problem go away when I debug the app next time. Restarting VS doesn't help either and restarting Windows only helps for a little while.
The main clue here is that devenv.exe shows low CPU usage while VS window is not active. Switching to VS window makes devenv.exe use more CPU, but trying to do anything in VS (especially editing a razor view or css file) makes the CPU usage skyrocket.
Anyone got an idea what could be causing this problem and how to solve it?
Being unable to edit css and views while debugging is seriously lowering my productivity (the app takes good minute or two to start).
P.S. The app I'm working on right now is a nopcommerce based shop, but I had this problem before while debugging MVC apps that had nothing to do with nopcommerce.
I didn't manage to find the source of the problem, but closing all editor windows in VS seems to make it go away. If there are further lag spikes, restarting debugging might be also a good idea.
Since I didn't see this problem in a new project, it might be related to the sheer size of the solution, the number of files being opened in the editor at one time (though the problem remained even when I left one view open), the time those files where opened in the VS (I'm not entirely sure why this would be a problem, maybe it has something to do with the file history).
I have iOS app that uses time to download info from data provider. Now problem is, that for some times around midnight, there is a bug in my app and data are not downloaded correctly (there is no problem with data on the server, data are correct). How can I debug this?
Solution with being awake around midnight is not very helpful, because I have only limited window when error occurs and after that, all is OK again. So, before I can pin-point what is wrong, time passes and I have to wait another day :-/
You have 2 options. You can either:
Set your iPhone time manually:
Settings --> General --> Date & Time
Select Set Automatically to OFF
You will see the current time at the very bottom. Select it to show a DateTime wheel to set it to whatever you want.
The Simulator can also be adjusted my adjusting the time on your Mac.
I have run into the same situation and it has helped me.
NOTE: You will have strange things happen if they are also date driven like scheduled appointments.
You might be able to reproduce it by using the iPhone Simulator and setting the system clock on your Mac.
If it's something like time synchronization problems between your app and the server (Amazon Web Services' API does this), then I'm afraid the only solution will likely be to stay up until midnight, or go through your code with a fine-toothed comb. That's hard, but it sometimes works.
A suggestion that would help you in these cases would be something like https://github.com/CocoaLumberjack/CocoaLumberjack, where you can log information to a file and email it, so you can debug issues like this even when not connected to Xcode.
I'm developing an application on two different machines (home and work) and while the home one seems to run just fine, the work one is, for lack of a better word, possessed. It has been exhibiting the following issues:
When loading the application, it will start at the simulator's main screen instead of starting the application at random intervals. You can start the application and have it work fine, then close the simulator, reload, and have the same codebase not load.
Going to applications doesn't show the application itself, in fact it never does.
Trying to load the applications cod file (File->load java program) never works. Tried the steps in this thread, with unreliable results.
Extremely small changes, such as modifying the value of a width variable by one, commenting out a function such as makeMenu or adding a button will cause code to no longer work, with no errors shown by the IDE.
Using clear.bat with sometimes work, sometimes not. Same with manually removing all files with the name of the project.
reinstalling the eclipse environment and the blackberry plugin did nothing more then burn off an hour.
having "load on startup" in the blackberry_app_descriptor.xml file is set.
Both systems are using Eclipse 3.5.1, BB plugin for eclipse 1.1 beta, Java 4.5 with the 8300 simulator. THe only difference that I am seeing is the operating system between the two systems. The work one being XP Sp3, home being vista. THe vista one isn't perfect, but I can test variable changes without flipping a coin to see if the app will even load or not.
I've tried the solutions that were similar on this forum, such as this one, but it looked to be that those solutions are dated as none of the options for the steps existed in my eclipse install.
So has anyone ran into such baffling behavior, and can it be fixed? Anything that I might have missed that could be tried?
I've been seeing this behavior with the new 1.1 plugin, the application doesn't load on startup and the FIle->load java program doesn't help. For me, the solution was I have to run a clean build every time, that is the eclipse clean and build instead of just build, not the clean.bat... Hope this helps!
Try clearing resources that have improper naming structure in your projects stuff with spaces or special character in the name of the file.
It took me two days to figure out.
One solution i got regarding your problem.
As I See Please run the application first time as Run as blackberry simulator
that is got start and here pick up run and then Run as Blackberry simulator