I have an app which is basically exporting DB data to Excel. It was working fine (given the fact that it is playing around with 1 million rows). While debugging the app, I was checking the task manager for memory consumption and the vshost32 exe was using around 4 GB. From some time (yesterday) when I tried to run the same app (with loads of data as before) I ran out of memory. I tried that again and every time when the app tries to use more than a 1.4 GB, it ends up with an exception. I haven't changed any code so I am really wondering where this strange behavior comes from?
I am using 32 bit Visual Studio 2012 on quad core processor with 8 GB of ram and a virtual Windows 8.1 64 bit.
Related
I'm working with maintenance of .NET 3.5 application. During application startup a number of fonts are read from working directory and registered in Windows. We use a pinvoke calls to AddFontResource(string lpFileName) (Gdi32.dll) for each font file.
The code has always been fast, that is until I upgraded to Win10 Anniversary Update (before that, there were no problems with Win10). Now a call can take half a second, which has increased startup time with 90 seconds.
Any idea what can cause the problem? And how to fix it?
Windows 10 anniversary update destroyed performance of the AddFontResource and RemoveFontResource APIs. We're dealing with fallout from it at PortableApps.com now. It's only an issue on Windows 10 after the anniversary update is applied. It's so bad that my old slow ASUS T100 convertible runs code from a USB drive faster than my i7 desktop does from an internal SSD.
I have also observed this problem, but in our case I found a solution: Call AddFontResourceEx().
The full change in our code was:
// from this
AddFontResource(pFont);
// to this
AddFontResourceEx(pFont, FR_PRIVATE, 0);
This solved the slowness problem in at least one of the machines I've personally tested.
I have a WPF application developed on a Windows 7 - 32 bit desktop. The app runs fine in the development system. It also runs smoothly on Windows 8 32 & 64 bit desktops.
When I run the same application on a tablet with Windows 8 - 32 bit, the application UI responds very slowly and runs very slowly. This application is actually used to monitor data received over UDP.
The tablet I am using is an HP ElitePad 900 which has Intel Atom Z2760 / 1.8 GHz (Dual Core), 2GB RAM.
I don't think the hardware is what is causing the problem.
I tried setting the ProcessRenderingOption as
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
in the application startup. But still no change. I need some suggestions/answers as to what the problem maybe.
FYI the tablet has Windows 8 not RTM, so it allows desktop applications also to run.
If there is no difference when you set ProcessRenderMode = SoftwareOnly, it is helpful to investigate the cause of problem.
Situation 1
If your app uses effects that can't be handled by GPU,
it is always rendered by CPU regardless ProcessRenderMode setting.
Thus, ProcessRenderMode is implicitly set SoftwareOnly.
So when you set the setting SoftwareOnly explicitly, it has no effect.
In this case, your app's performance depends on CPU throughput.
ATOM may be poor than your desktop CPU, the result can be explained.
Situation 2
If your tablet's GPU has not enough to render WPF effects,
some effects are rendered by CPU. This causes performance down.
You can check WPF GPU capability with System.Windows.Media.RenderCapability class.
Conclusion
The cause is
CPU throughput because your app is always rendered by software. Or
poor GPU capability to render WPF rich effects.
When I am working in a project that several of my colleagues work in too I have significantly longer starting time of IIS than the others.
Almost every page in the application takes ages (the first time) but after that it goes smooth. The difference in loading time is like 1-2 seconds for my colleagues and 5-12 seconds for me. My computer is BY FAR the most powerful in terms of internal memory, hard disk speed, CPU speed and more. Almost twice as fast as others, but still I get this problem.
I don't have any other problems with my machine.
We all use: VS 2013, Chrome 35.019, C#
I use: IIS version 8.5, Windows 8.1
Colleagues use: IIS version ?, Windows 7 and Windows 8
Spotify can affect VS and IIS performance on certain hardware. If you have this problem and you are using Spotify, try to turn it off and see if it works better.
I'm developing an app that runs on both WP7 and WP8. After I finished it I started running the Performance analysis to improve the app overall performance.
The app is written for WP7, but I have some projects that run over WP8 to add features like in-app-purchase, lockscreen and so on.
When I ran the memory analysis on WP7, the app averaged 50mb of ram throughout execution, an acceptable value, the weird thing was when I ran the same xap on a WP8 device the app uses on average 150mb of ram.
I searched around the web and found nothing related to this issue.
I used a Lumia 800 and lumia 510 to make the analysis on the WP7., and use a Lumia 520, 820 and 925 to make the analysis on WP8 devices.
I'm using Visual Studio 2012.
I also considered that it could be a bug on VS2012, but the app crashes on the lumia 520 (with out of memory, after a while) but never crashes on the lumia 800 or 510.
The app is heavy on images, but all of them are the exact size that is used on the phone (never more than 50 100x100 jpg pictures are displayed in the app at the same time).
Any suggestions and solutions are welcome.
EDIT: The memory differences that I'm talking about is just by running the Home view, my performance analysis test is simply, launch the app swipe some controls (I have a pivot with 2 items) and close the session. There is no navigation involved. I'm using a RadDataboundListBox, but already tried to change to Listbox and LongListMultiSelector without any significant memory consumption change
I am developing an application using WPF. I am using a lot of Grid layouts. In my application, we use five services to communicate. All works fine. Sometimes, the application slowed way down so I checked task manager to see the memory usage. Then I saw 1.285 GB memory occupied by the application process.
I am using Windows 7 operating system. My Application developed in wpf 4.0 version. In that we use WCF , WIF etc for communication. I also used Images. Can any one give the solution why application process occupies more memory?
All the images are small images.Actually my application occupies nearly 110 MB.But sometimes it occupies 1.238 GB memory.I am not using Large images in my application.
There's no magic bullet answer here for you, it really depends on what you are doing in your application.
Its time to jump into the world of using a profiler and figuring out what is going on in your own app.