UWP app runs slow in release mode when deployed on Windows 10 Mobile device through store - windows-10

I am facing a strange issue. I have a UWP app published in store. When I deploy this app to my Lumia 930 through the store, it runs very slowly. However, the same app when I deploy to the same device in debug mode from VS 2015, it works fast. To be specific, I am relying on heaving caching in a Sqlite database for displaying the results, plus I also have lot of List processing done in my logic. In debug mode, one specific page with particular set of data takes around 3 seconds to load and show the results. The same page with same data takes 8-9 seconds when running on the same device but downloaded from the store.
Any idea, what I am doing wrong, or is there something which I am missing. The particular app in question is: https://www.microsoft.com/en-us/store/apps/series-tracker/9nblggh3slj9
Appreciate your help.

Related

Error and problems after publishing ASP.NET 5 vNext RC2 to Azure

When I publish to Azure my tiny, tiny test project, configured in the latest vNext RC2, I get the following error upon first load after an extremely long wait:
The specified CGI application encountered an error and the server terminated the process.
Subsequently if the app is anything more than the very simple "Hello World" project below, i.e. it uses some MVC etc. then the app is extremely unresponsive, failing to load some images, taking minutes to load each page. Although sometimes it's suddenly fast for a little while, then slow again.
In RC2 there were some changes to the hosting setup, but all these have been implemented in my tiny test project.
I have also seen this question and ensured I am publishing the exact correct version of the CLR, in fact for information the same result happens if I use full or core CLR.
Here is the example project (publishing profiles removed):
https://www.dropbox.com/s/hpkrj6c74eaytjz/TinyProject.zip?dl=1
If I create a new RC1 project, the problem doesn't surface, but as soon as I update it to RC2 the problem persists.
In the end I solved this by creating an App Service Plan that was anything other than the free or shared option, in my case B1 (screenshot from Visual Studio Azure SDK):
Has your Azure Web app instance had a RC1 instance uploaded to it prior to your RC2? Your project looks ok to me, I can't see anything wrong at first glimpse with your project.json, Startup.cs or hosting.json files. I had an instance of RC1 on a Web App, and when trying to upload RC2, nothing would work, just a long long wait until eventually it would time out with a 503 error. I deleted the Web App, and just published the RC2 (using same DNX build as yourself) and everything works fine (so far!).
Also, if you turn on Diagnostic logging in your Web App, does that provide any more info?

How to properly use Application Insights in UWP, offline scenario

In my UWP app I want to use Application Insights, but after many hours search for the best implementation, I don't know how to do it.
I use MVVM Light, and in App.xaml.cs added below code:
WindowsAppInitializer.InitializeAsync();
In the every ViewModel I have new instance of TelemetryClient. Everything looks great, but I have a problem with synchronization in offline scenario.
I assume that in this situation data should be stored in AppData\Local\Microsoft\ApplicationInsights{appGuid} or AppData\Local\Packages{appGuid}\LocalState\ApplicationInsights and then sync with Azure, but both localization are still empty. The same problem exist when I'm offline in release and debug mode.
What is your suggestion for me ?
In you ViewModels, do you use the instance of TelemetryClient to send some data to the server (or to the cache, in offline mode) ?
Also, have you properly configured AppInsights ? Does it works when you are online ?
Edit: Does is happened in Release Mode or Debug Mode ? According to the doc:
https://azure.microsoft.com/en-us/documentation/articles/app-insights-windows-usage/
Debug
If you build in debug mode, events are sent as soon as they are
generated. If you lose internet connectivity and then exit the app
before regaining connectivity, offline telemetry is discarded.

Visual Studio 2012: MVC, Umbraco site extremely slow while debugging

Windows 8.1 Pro, Visual Studio 2012 Update 4, MVC4 Umbraco site using SQL Azure (have also tried with a local SQL 2008 R2 db). Running through IIS.
Site runs perfectly while not debugging. However, when debugging the site is extremely slow. The default page takes nearly a minute and a half to execute. Subsequent requests take the same amount of time.
I thought this may be environmental (Surface Pro 3, i5), so went over to a MacBook Pro (i7)...issue still occurs on that PC as well.
At my wits end trying to figure out what could be causing it.
Thank you so much!
There are several thing that could be happening here. Using an Azure SQL db would cause slower initial loading of pages (compared to a local db) because of the data transfer time. However, subsequent page loads should be quick because everything would be loaded into the site cache.
If subsequent page loads are still extremely slow then this could be because the XML cache isn't being generated. Check that the settings are correct in the web.config in debug configuration.
Also, check where you are writing your debug logging to. Umbraco will write log messages to a log file in App_Data/Logs/ and also separate logs to the database. Using a remote database would make these writes slower.
Without knowing what else is happening in your project it's difficult to know what other factors may be playing a part. But you need to step through the application in debug mode in VS and you can check the event viewer for swallowed errors like timeouts. Finally, you can use a profiler to pin point exactly where your issue is.

NetSuite Web services hang / timeout from .NET 64 bit App

We have noticed that with the 2012 NetSuite Web services (and perhaps all other versions), when we make a call from a .NET 2.0 64-bit application, if the response does not come back quickly, then intermittently our application will hang however in the NetSuite application logs it appears the SOAP call was successful. The hang eventually times out (timeout) after 5 minutes (!) because NetSuite (or something) keeps the socket open, it just stops sending packets.
We ran a Network Trace and noticed packets coming out of order, being dropped, inexplicable duplicate acks - etc. Essentially, it "freaks out". Microsoft techs have never seen anything like it - least the ones I talked too.
We ran a simple test app that does nothing more than passport in, then do a query for Accounting Periods. It's the search method that hangs as it's parsing the SOAP response - always gets about 10s in.
As soon as we target a 32-bit environment, everything works like a charm, even though the 32-bit binary is running on a 64 bit OS. Clearly, running as a 64-bit app sets some network protocol configuration that NetSuite really doesn't like.
We tested on Azure, Amazon and on a local (to our corporate network) Windows 2008 R2 SP1 64 bit servers - physical and VM's.
We don't have hard evidence of the "why" this is happening, but after a month of pulling our hair out (we're all bald now) we think we've stumbled upon an issue. This one is so weird, however, I'm not willing to go out and claim that it's still not something we're doing. So, if you don't believe:
Open Visual Studio 2010 and create an .NET 2.0 console application targeting "Any CPU".
Do a "Add Web reference..." and add the NetSuite WSDL.
Create a simple passport login and do a search that returns something with some volume.
Run the EXE on a 64-bit OS, several times (this bug is intermittent), during peak working hours (i.e. appears around 7am - 2pm PST).
That's exactly what we did. If you go back and create a new x86 target and rebuild the project, it works fine.

Windows Azure local development environment speed

I've started porting an existing ASP.NET web app to Windows Azure and have noticed that the development process is really slow. Each time I make a change to my code and want to view it, I have to effectively redeploy it to the local dev cloud (using Start debugging (F5) or Start without debugging (Ctrl-F5). The process itself takes over a minute, during which time Visual Studio is completely unresponsive.
Am I doing something wrong or is that simply how things are developing for Azure?
My specs:
Visual Studio 2008 9.0.30729.1 SP
5 projects running on .NET 3.5 SP1
Azure SDK 1.1 (February 2010)
Single instance of a single web role
Dual-core AMD 64 machine with 8GB RAM, 64-bit Windows 7, fully patched
The main project itself is quite large (3k files, ~200k lines) but compiles normally in 10-15 seconds
If your web role has limited functionality, you might be able to just set the Web project as the Active Project in your VS solution and run from there.
For example, my web role doesn't call into table storage, blob storage, etc... it just makes some Azure logging calls and interacts with SQL Azure. So sometimes I just set the web project to be the startup project in the VS debugger, not Azure, and run from there. I've properly written my logging calls to check if Azure is available before they write, so they don't execute in this situation.
Of course, if you're doing lots with table storage, queues, blobs, etc. then this is not for you.
Normally in a development machine we just compile and run the solution. In case of Azure development there is a additional step where the specific project is deployed in the Dev fabric which involves copying the complete web site content to the dynamically created deployment folder. Since you have a large number of files this would require all those files to be copied into a new folder every time you press F5 or Ctrl-F5. This may cause the delay you are noticing.
This scenario also highlights the inflexibility in deploying the solution over the App fabric. Any time you change any content (static or dynamic) in the website the complete site has to be packaged and re uploaded on your production server.
In my case when I changed the port from 80 to something else (under end points) the speed returned to normal.
Microsoft's Steve Marx has a blog post about running a website from a mounted VM in Azure. This may be a good development pattern since you simply update the contents of a VM stored in blob storage instead of having to redeploy to the fabric each time.

Resources