|
is your code and the database running on the same machine?
how many cores are there?
what is inside the stored procedure?
how many different values are you sending to lblTimer per second? (or how long is the SMS table and how long does your code actually run?
if you don't have polling loops, and if you have chosen good algorithms, CPU activity is OK, it just says the processor is working for you.
if the database is elsewhere or the SP is light, then your code is mostly switching threads to update some labels, i.e. your GUI is costing a lot then.
[ADDED]
1. you're not going to have a display with a permanent status update on a server, are you?
2. when update frequency is high, a better approach is to store, not display, the status in some variable(s), and have the GUI update itself (with a Windows.Forms.Timer) a few times a second. When the variable is a 4-byte int or smaller, no need to have synchronization logic (such as locks) at all.
[/ADDED]
|
|
|
|
|
s your code and the database running on the same machine?
Yes both on the same machine.
how many cores are there?
Core Due
what is inside the stored procedure?
Just a select statement only
how many different values are you sending to lblTimer per second? (or how long is the SMS table and how long does your code actually run?
The code runs for about 10seconds
|
|
|
|
|
jrahma wrote: The code runs for about 10second
and how many SMS (and hence lblTimer updates) is that?
|
|
|
|
|
Is the CPU being used by your application or the SQL Server?
|
|
|
|
|
What is your timer interval set to? If it is too small, they tick events may be happening too often depending on the time it takes to perform the actions in each one.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
and how many SMS (and hence lblTimer updates) is that?
I am not sending anything now because I am just testing but I am looping through about 100records only
Is the CPU being used by your application or the SQL Server?
I am using MySQL not Sql Server
What is your timer interval set to?
It's set to 15minutes but even if I set to 24hours CPU will jump to 78% from the time the timer runs
|
|
|
|
|
please give me idea about effect. in android or windows vista a effect is used when any application window is open or closed. effect is like grow and shrink. very similar like jquery transfer effect. i can generate that effect like window size increment or decrement with in time but it flicker and not smooth like professional. so please guide how to generate that effect in windows application which look very professional. also tell me is there any free open source library to generate that kind of effect. please me with sample code.
thanks
tbhattacharjee
|
|
|
|
|
Is that what your users want? I wouldn't.
|
|
|
|
|
no rather i want to design in such way for users eye's satisfaction. can u help me.
tbhattacharjee
|
|
|
|
|
Why don't you just concentrate on creating a well design/well written application. These bells and whistles are a waste of time.
|
|
|
|
|
Hello:
i use vs2005(C#) and the OS is WinXP.
Now i want to get the local pc's monitor's status,
include [on] [off] [standby] three status.
what should i do.....
Thanks
|
|
|
|
|
|
|
Ask the user to click a button.
|
|
|
|
|
Accurate? Yes.
Helpfull? No.
Have a five anyway!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
I think he used to be an editor at MSDN...
Will Rogers never met me.
|
|
|
|
|
Excel receive live data from DDE .How to retrieve those values.I must read unsaved live data
|
|
|
|
|
Error 1 Unsafe code may only appear if compiling with /unsafe C:\Visual Studio 2010\Projects\Unsafe\Unsafe\Program.cs 6 24 Unsafe
Error 2 Unsafe code may only appear if compiling with /unsafe C:\Visual Studio 2010\Projects\Unsafe\Unsafe\Program.cs 10 31 Unsafe
using System;
class Unsafe
{
unsafe static void SquarePtrParam(int *p)
{
*p *= *p;
}
unsafe public static void Main(string[] args)
{
int i = 5;
SquarePtrParam(&i);
Console.WriteLine(i);
}
}
How to run csc /unsafe *.cs
|
|
|
|
|
if running SCS from the command line, add the switch.
if running Visual Studio, go to Project Properties, and look for "Allow unsafe code" checkbox.
|
|
|
|
|
Deja Vu all over again. The 3rd time this user has asked the same question
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Just found some of his attempts to ask this, earliest one dates August 10[^]!
|
|
|
|
|
That´s the reason why MS made it "difficult" to use unsafe code ...
|
|
|
|
|
|
How kind of him to give you advance notice, so you could perform all necessary research in time...
|
|
|
|
|
Guess they are just trying until getting an answer they like.
I know the language. I've read a book. - _Madmatt
|
|
|
|