|
It works like a champ! Thanks of the info.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hi,
I have developed a windows form application.Now,i am using task manager to monitor its perfomance,i got that the cpu usage is lower(but sometime will raise to 9) ,but when i look at the memory usage(In Processes),i was used about 40000k memory to 60000k memory, sometime even higher than these values.I will very appreciate if anyone can tell me my application is consider high perfomance or low perfomance? (How to evalute?)
If my post is place wrongly,please guide me where should i get my answer.
thanks
cocoonwls
|
|
|
|
|
Hi,
to me performance is measured in functional results per unit of time, so it does not involve CPU load or memory footprint. Functional results could be
transactions/second in a database, pages/minute printed in a report tool, etc.
I can not tell you whether your app is hi or lo performance. Do you consider a
10 page/minute printer fast or slow ??
You can compare with two kinds of things:
- the performance of another program with similar functionality;
- your own expectations.
In either case, you (or your customers) will be the judge.
Having the same performance at a lower cost (less CPU load, smaller memory footprint)
can be an added bonus. It could become relevant if your app is being ran by
several concurrent users on the same machine (especially if a server app).
Hope this helps.
Luc Pattyn
|
|
|
|
|
hi Luc Pattyn,
Thanks for reply.Actually my application is using for monitory[include displaying data in chart format(in real time,display 30 charts at the same time with using thread ),generate log file and save into database & textfile, and report view function] certain information which get from third party device through seriall port. Each 3 sec will get request a data from third party device.
May be i should change my question,it should be "Isn't a good quality application which develop by using c#?"
Anyway,you have gave me a good answer on it.Thanks
regards
cocoonwls
|
|
|
|
|
Hi, I like it when the question can change and the answer can remain the same...
Luc Pattyn
|
|
|
|
|
hi, I am welcome and appreciate if you would like to answer the question "Isn't a good quality application which develop by using c#?"
cocoonwls
|
|
|
|
|
I am not sure I understand the question. If you mean to ask "Can we develop quality
software in C# ?" the answer is yes (you can in any language, some make it easier
to achieve quality and/or productivity, and C# certainly is amongst them).
If you mean to ask "Can we develop the highest performance app with C# ?" then
I would say you can achieve good performance with C#, but you also can waste a lot
of performance using it. And you might get somewhat better (or even much better) perfo
when staying closer to the hardware (anything from C++ downto assembly code,
e.g. when you want to exploit the vector processing capabilities known as MMX and SSE
on Pentium).
Luc Pattyn
|
|
|
|
|
According to both of your answer.I have my own result,my application is low performance...
Thanks!
|
|
|
|
|
Is it ? I'll ask a lot of questions now, you dont have to provide the answers, I just
want to make you think a bit more about it.
By how much, i.e. what kind of speed up would you want ?
Do you think that is achievable ?
If so, why dont you have it right now, i.e. where are you loosing it ?
Is there a particular part of your app responsible for its (lack of) performance ?
I recall your CPU load was low, so this seems to indicate you are mainly waiting
on something. Any idea what ? (the database ? the network ? running out of sockets ?
having a resource leak ? swapping virtual memory all the time ?)
Is the UI responsive all the time (if not you definitely did something wrong) ?
Hope this helps.
Luc Pattyn
|
|
|
|
|
I would have not defined it any better!!! Thumbs up!
|
|
|
|
|
What you're seeing is the working set and this should not be trusted. If you're truly interested in your managed application's performance, you should take a look at using various .NET performance counters in your perf monitoring tool (perfmon in Windows) and add those counters.
Additionally, on MSDN you'll find links and articles to various performance tools that peer inside of managed applications and show you allocations or even profile your code to show you where your heaviest calls are, or where your application spends the most time. Optimizing based on profiling is an extremely useful tool.
As far as the working set for managed Windows Forms applications goes, if you minimize and then restore your app you'll most often notice that number go down. A lot of this is just how the memory manager allocates memory, and how and when the GC collects. Again, you can find lots more data about all that in MSDN at http://msdn.microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
My Software is installed on a terminal server. So 5 users connect to it at the same time.
I want to refer each user that an instance of the programm he wants to start is already running.
Now i have the Problem that the first user starts the programm and all users after him get the message they've already started.
I thought, comparing the owner of the process with the current user would make it better, but i still get the processes for all users(depending on the machine) and not for the current windows user.
i hope somebody can parse what i want with this
|
|
|
|
|
Hi,
you could create a Mutex with a name that includes your process name (in order not to interfere with other programs that might do similar things) AND the user's name
(e.g. from Environment.UserName). And then try a WaitOne on it:
string name="myProgName"+Environment.UserName;
Mutex m=new Mutex(false, name);
if (myMutex.WaitOne(1,true)) {
... this is my first instance
} else {
... I already have an instance running
}
You should keep m as a global variable so its life spans your app's life.
I typically have a class that does such singleton test before I create my main form,
hence in the static void Main() method.
PS: you could use Environment.GetCommandLineArgs()[0] to obtain your prog name
(actually its exe's file name).
Hope this helps
Luc Pattyn
|
|
|
|
|
Hi ,
I am using vs.net 2005
i run a windows application after running
My problem is when i click the top of the form th form is noveable.
i want to fixed it .
i set minize box= true
and maximize box=true
plz help me
|
|
|
|
|
To prevent the form from being moved, you need to hide the entire non-client window frame. You can do this by changing FormBorderStyle to FormBorderStyle.None like so:
using System;
using System.Windows.Forms;
class MainForm : Form
{
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new MainForm());
}
MainForm()
{
FormBorderStyle = FormBorderStyle.None;
Button btn = new Button();
Controls.Add(btn);
btn.Text = "&Exit";
btn.Click += delegate(object sender, EventArgs e)
{
Close();
};
}
}
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hey,I'm new for the group, I have a little problem with menuItems.
I'm developing a pocket pc application in vb.net (compact framework), so I have an indefinited number of "Inherits System.Windows.Forms.Control" and
only one "Inherits System.Windows.Forms.Form" alias the MainForm.
In this MainForm I have created the menu and I have added the menuItems visible for all the "Controls".
I want personalize the menuItems and render visibles some menuItems in some controls and not in other.
which is the best way to improve my code?
I've tryed to disabled my menuItems with the fragment "me.menuItem.disabled = true" in maiform, and it give back correcty disabled the component in every forms, but if I want render it disabled in some other form, what should I do?
thank to everybody!
daniele castrovinci
danael
-- modified at 7:40 Wednesday 14th February, 2007
|
|
|
|
|
Hi,
I am using vs.net with windows application. My screen resolution is 1024 by 768 pixels. My form size is fixed to 1024 by 740. What i want is if i increase the resloution form will fit to the screen automatically. If i decrease the resolution, the scrollbars have to be appear. How to this. ?
Plz help me urgent.
|
|
|
|
|
Hi,
I suggest you have a look at SystemEvents.DisplaySettingsChanged event.
Luc Pattyn
|
|
|
|
|
Hi
My idea is using Anchors. Each control will be having one property called anchor. Set the anchor. When the form is resizing controls will also resize
Cheers
Navaneeth!!
|
|
|
|
|
Just a general query, as i am under the illusion that with the .net framework installed on the host computer that vb.net applications can run with it.
Can someone clarify this for me please, and if it is possible how is it easily done?
Thanks
|
|
|
|
|
Visual Studio.NET is not required to run .NET applications. If it was, then each user would be required to license a copy which, considering the cost of VS, would be a spectacular own goal. You don't even need VS.NET to write .NET applications. You code, if you want, write them using Notepad. I'm not saying you should, only that you could.
Borland have a .NET IDE and there is a free one called SharpDevelop.
Anyway, to run the application all you need to do is compile it up as an EXE and run it on a machine with the appropriate version of the .NET framework installed.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I need a Charmap-like control in .NET.
I want to display a List<char> in this control, to display a "select a special character" dialog to the user.
What would be the best approach to display the list in a similar way like in the charmap.exe? Is there a control I can user for this (didn't find one by now) or do I have to write this control from scrath by myself?
Thanks in advance,
Sebastian
|
|
|
|
|
PhoenixHawk wrote: Is there a control I can user for this
Haven't come across one.
PhoenixHawk wrote: I have to write this control from scrath by myself?
Looks like it, perhaps just using the DataGridView is enough?
|
|
|
|
|
l you have to do is shell out to charmap.exe.
This applet puts your selected symbol into the clipboard buffer and then you can paste them anywhere you want.
See => ©«®¶Æ
|
|
|
|
|
Hello all,
I've been looking for an answer to this all over the internet, so I think I already know the answer to this. I just need to be reassured.
So, when a Kill() command is invoked on a running process, can that process trap/catch the signal, or is there an event that is raised before the process is killed? Or is there perhaps a similar command to Kill that can be sent from one process to another which can then be caught; something similar to the kill signal overloading on POSIX system? (ie. sigusr1)
BTW, I need to know if this is possible using the .NET framework 1.1
Thanks.
|
|
|
|