|
You can use perfmon utility that is shipped with windows this will atleast give you some idea.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Could you please tell me
Where this utility is.
How I can open and use it ( its location /path) and some using hints
Thanks
Regards.
|
|
|
|
|
One way is to go to the Run option in the Start Menu and type perfmon.
Another one is to go to the Administrative Tools in Start Menu>Settings>Control Panel>Administrative Tools>Performance
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Try _AnShUmAn_'s idea; you need to determine why it's getting slow. Is it consuming too much CPU time? Is it consuming too much memory? Even task manager can be a big help with this.
Steve
|
|
|
|
|
OK, IF its CPU consuming hten how can handle it , otherwise if its memory using how can I handle it
Regards.
|
|
|
|
|
None of these questions have a useful generic answer apart from the obvious. i.e. Use less CPU time/memory. First things first: identify the problem.
Steve
|
|
|
|
|
HI,
I have check CPU usage is 99% , while memory usage is 3500 K
So how can I reduce CPU usage for my application so that other application aslo run smothly
Regards.
|
|
|
|
|
You need to find out which part of you code is consuming all the CPU time. You could try a profiler. There is also the "poor man's profiler": run the program in a debugger and break execution multiple times and see what the program is doing.
Steve
|
|
|
|
|
Could you please send me a link to a free and good profiler download
thanks
Regards.
|
|
|
|
|
He, I think your code may have infinity loop.
Like this:
while(i < 100){
//forget increase i
//i++;
}
Check the loops in your code.
|
|
|
|
|
The "poor man's profiler" will find this one.
Steve
|
|
|
|
|
hi ,
I'm facing severe problem in erase method of STL in vc++6.0.
The code looks like below:
list<items> listItems;
list<items>::iterator iteBeg, iteEnd, itePrev;
getItems(listItems); //The function is defined in a DLL
for(iteBeg = listItems.begin(); iteEnd != listItems.end(); )
{
/*** processing ***/
//----more processing..
if(listItems.id == clientId)
{
itePrev = iteBeg;
iteBeg ++;
listItem.erase(itePrev); //=========== HERE IS THE ERROR "unhandled exception"
break;
}
//Some more processing;
iteBeg++;
}
I'm facing the erase method of the list class.
The list is filled by a function which is defined in a dll.
In debug mode, no problem at all. But I'm facing problem in release mode. I'm sure the dll (where getList() is defined) is also built in relase mode.
please correct my code, if somewhere I'm going wrong.
And in the msdn forums they specified STL in vc6 is terrible, and third party extensions are availlable. Please suggest me if any of such.
Thanks in advance.
Raja Pratap
|
|
|
|
|
Raj Prathap wrote: getItems(listItems); //The function is defined in a DLL
That's likely your problem. Depending on how the code is built (using a static vs. DLL version of the CRT), you may not be able to alloc memory in one module and free it in another. Filling in a list will alloc memory, obivously, so the erase will free it.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Dear Mike,
Could you please suggest us the way to resolve it. We have to fill the list in one module and the erase is called in another module.
If I write the destructor(int the header file for Item), does it solve the problem. Or there is no way ?. Please help us, its very to us.
And also, in debug mode we are not at all facing the problem.
Thanks in advance.
--
pratap
|
|
|
|
|
Firstly we can't see any "<" or ">" characters in your post. Secondly there is no formatting. Please consider the people who are donating their time to help you and take some time to make your question legible.
Try code like this:
-------------------
#include <list>
#include <algorithm>
struct items
{
int id;
};
class item_id_equals
{
public:
item_id_equals(int id) : m_id(id) {}
bool operator()(const items &item) const
{
return item.id == m_id;
}
private:
int m_id;
};
int main(int argc, char* argv[])
{
using namespace std;
typedef list<items> colletion_t;
typedef colletion_t::iterator collectionIter_t;
colletion_t ItemList;
// Fill the list here...
collectionIter_t e = ItemList.end();
collectionIter_t i = find_if(ItemList.begin(), e, item_id_equals(5));
if (i!=e)
{
ItemList.erase(i);
}
return 0;
}
Steve
|
|
|
|
|
Thank you Steve for your reply.
Sorry, but while posting the "<" and ">" I have included.
I'll definitely take care of formatting in my future posts.
--
pratap
|
|
|
|
|
i done a project on time i have a combo box in that we have different countries once we select the coutry,then we will show the corresponding time.
it's work well.but problem is
one we execute the project and if we change our system time then in my project also changing
plaese help me,
thank u for read,
sree.
|
|
|
|
|
Are you using CTime::GetCurrentTime that returns the current system time
Then you would be converting that time to GMT Time or something else.
Right?
So when you are changing the system time, the change is reflected for the other time zones.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thnak u.
i have done the same.
so how can i rectify this.
ram.
|
|
|
|
|
So what exactly is the problem?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i am developing a project that includes chart.. dow do i generate charts using vc++ ?? pleaase help me.. i am using PGL ligrary... what is the procedure?
-- modified at 2:03 Friday 30th June, 2006
|
|
|
|
|
I developped a chart control. Take a look at the link in my sig if you are interested.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
hello
can i include ur link in my code.. if i can ,please tell me the procedure..
thanks..
regards
sriv
|
|
|
|
|
sriv_18 wrote: can i include ur link in my code..
What do you mean ??
Did you take a look at my article ? Everything is explained quite in detail.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|