My Application takes Very CPU usage and Memory
-
Hi All, My application takes a lot of Memory usage and CPU usage. I am using thread in timer and i am using 7 timer in a class.So please help me. Thanks Best Regard Anubhava Dimri
mailto: anubhava.prodata@gmail.com
Please use profiling tools any of following tools : CLR Profiler[^] NDepends[^] By using above tools, you will come to know expensive part of code. Then you can try to optimize that code. :)
dnpro "Very bad programmer" My Latest Articles RichTextBox Control with Find functionality LogViewer - A Simple Log Listening Utility
-
Please use profiling tools any of following tools : CLR Profiler[^] NDepends[^] By using above tools, you will come to know expensive part of code. Then you can try to optimize that code. :)
dnpro "Very bad programmer" My Latest Articles RichTextBox Control with Find functionality LogViewer - A Simple Log Listening Utility
But how can i know in which module is generating that problem.and I m using on error resume next for error resloving.
mailto: anubhava.prodata@gmail.com
-
But how can i know in which module is generating that problem.and I m using on error resume next for error resloving.
mailto: anubhava.prodata@gmail.com
:confused: Have you tried to use any of mentioned tool. Better to try out, You will granular report on which function or module is taking most of CPU time.
dnpro "Very bad programmer" My Latest Articles RichTextBox Control with Find functionality LogViewer - A Simple Log Listening Utility
-
But how can i know in which module is generating that problem.and I m using on error resume next for error resloving.
mailto: anubhava.prodata@gmail.com
eg_Anubhava wrote:
how can i know in which module is generating that pr
Thats what the profiling tools show you.
eg_Anubhava wrote:
on error resume next for error resloving
Nothing to do with profiling, but it could mean you are not freeing up resources if you get an error.
Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
-
:confused: Have you tried to use any of mentioned tool. Better to try out, You will granular report on which function or module is taking most of CPU time.
dnpro "Very bad programmer" My Latest Articles RichTextBox Control with Find functionality LogViewer - A Simple Log Listening Utility
Hi, When i m starting application throw CLRProfiler it generates an error. Error Detail is given below: ee the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at CLRProfiler.Form1.WaitForProcessToConnect(String tempDir, String text) at CLRProfiler.Form1.startApplicationButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///D:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- CLRProfiler Assembly Version: 1.0.1395.16737 Win32 Version: 1.0.1395.16737 CodeBase: file:///E:/Other/Download%20Projects/CLR/Binaries/CLRProfiler.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///D:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///D:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///D:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Configuration Assembly Version: 2.0.0.0 Win3
-
But how can i know in which module is generating that problem.and I m using on error resume next for error resloving.
mailto: anubhava.prodata@gmail.com
eg_Anubhava wrote:
and I m using on error resume next for error resloving.
That's not "error resolving", that's burying the errors. If you're using "On Error..." in VB.NET code, you're digging yourself a hole. That only exists for VB6 backwards compatiblity. I highly recommend re-writing the code to use Try/Catch blocks instead.
eg_Anubhava wrote:
mailto: anubhava.prodata@gmail.com
And noone cares about your email address except spammers.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Hi, When i m starting application throw CLRProfiler it generates an error. Error Detail is given below: ee the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at CLRProfiler.Form1.WaitForProcessToConnect(String tempDir, String text) at CLRProfiler.Form1.startApplicationButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///D:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- CLRProfiler Assembly Version: 1.0.1395.16737 Win32 Version: 1.0.1395.16737 CodeBase: file:///E:/Other/Download%20Projects/CLR/Binaries/CLRProfiler.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///D:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///D:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///D:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Configuration Assembly Version: 2.0.0.0 Win3
Comment out your error handlers. It appears that your code is generating errors in a loop, but your "error handling" code is burying the errors so you can't see them.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
eg_Anubhava wrote:
and I m using on error resume next for error resloving.
That's not "error resolving", that's burying the errors. If you're using "On Error..." in VB.NET code, you're digging yourself a hole. That only exists for VB6 backwards compatiblity. I highly recommend re-writing the code to use Try/Catch blocks instead.
eg_Anubhava wrote:
mailto: anubhava.prodata@gmail.com
And noone cares about your email address except spammers.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Hi Sir, My application normally takes CPU usage 0 - 5 in administrator account but in Guest account it takes 10- to 46. please suggest me what is the problem
mailto: anubhava.prodata@gmail.com
-
Please use profiling tools any of following tools : CLR Profiler[^] NDepends[^] By using above tools, you will come to know expensive part of code. Then you can try to optimize that code. :)
dnpro "Very bad programmer" My Latest Articles RichTextBox Control with Find functionality LogViewer - A Simple Log Listening Utility
How can i know that in which process takes a lot of memory.
mailto: anubhava.prodata@gmail.com
-
How can i know that in which process takes a lot of memory.
mailto: anubhava.prodata@gmail.com
Please use This[^] it will provide you bits and pieces on your system's memory utilization.
dnpro "Very bad programmer" My Latest Articles RichTextBox Control with Find functionality LogViewer - A Simple Log Listening Utility
-
Please use This[^] it will provide you bits and pieces on your system's memory utilization.
dnpro "Very bad programmer" My Latest Articles RichTextBox Control with Find functionality LogViewer - A Simple Log Listening Utility
My application gets memory from 13000 to 30000 and CPU Usage is 0 to 1. I am developing application in vb.net.And i am using image in application. is Image or .Net framework or comment occoupies memory.
mailto: anubhava.prodata@gmail.com
-
Hi Sir, My application normally takes CPU usage 0 - 5 in administrator account but in Guest account it takes 10- to 46. please suggest me what is the problem
mailto: anubhava.prodata@gmail.com
You're using VB.NET and the old VB6 error handling?? Not a good idea... Anyway, it's impossible to tell you what the problem is because we haven't seen your code. Don't post the entire project. What you have to do is use a code profiler to find out where the problem is. Since the app works as an admin and bogs down as a normal user, I'd say you're doing something that requires admin rights, but your error handling is written so badly, it's burying all the errors.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008