|
Hi friends,
Can anyone suggest tips or tools or tutorials for improve perfomance for old Visual C++ projects ?
My company maintains a lot of Visual C++ projects of our customers. Our customer gives C++ projects of about 2-5 years old and request us to improve perfomance.
If anyone worked for such kind of maintanence projects which includes perfomance tuning, please help us by your valuable tips.
Thanks & Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
I offer this tongue-in-cheek:
When you initially create a project, lace it with gratuitous sleep and delay-type code. Then when the customer asks that its performance be increased, simply remove the extraneous code and voila...you delivered a faster product and the customer thinks you killed a bear!
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
U are a SuperHero James ,
I cant say it was good tip
but will surely say this will
help me to do business & from
a business mans point of view
it was great tip.
Thank you
Pls send me more business tips.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
It's hard to point to general techniques to improve performance in abstract.
As vague as it sounds, I'd say you first need to identify which are the parts of the program in which you find it slow to respond, and then visually inspect the code and make some profiling, looking for opportunities to improve.
Maybe if you posted about some concrete thing you want to optimize...
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Dear Lamas,
Thank you for your reply. Actually that project is a mission critical backend application running in an ultrasound scanner product. Its build up on some alreay running frameworks. It uses a custom database. So no hope in optimizing those areas.
But the application is performing some communication by using winsock. So if you can comment on network communication optimization it will be helpful for me.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
A good site about networking with free code in Visual C++ of TCP/IP, ICMP, Finger, Ping, Trace, scan port, DNS, ...
http://www.ipmanager.com.ar
|
|
|
|
|
sebastianos@gmail.com wrote:
A good site about networking with free code in Visual C++ of TCP/IP, ICMP, Finger, Ping, Trace, scan port, DNS, ...
But's that's not in English....
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
How do you build a project/Solution using the makefile of the project in VS.NET 2003?
For example, I have a sample that I'm trying to build form the DirectX SDK. Unfortunately there is no DSP, DSW, or SLN files given for the project. However all the .cpp and .h are there as well as the makefile for the project. How do I create a .VCPROJ or .SLN file for this projet ?
-Cindy
|
|
|
|
|
hi, all
does anybody know when should be release the auto pointer? thanks!
m_pdbf = std::auto_ptr<cb_dbf_ntx>( new CBNoMessageBox_DBF_NTX( pszFileName ) );
|
|
|
|
|
That's not the way to use a std::auto_ptr . Do like this:
std::auto_ptr<CBNoMessageBox_DBF_NTX> msgbox(new CBNoMessageBox_DBF_NTX(pszFileName));
msgbox->SomeMemberFunctionOfCBNoMessageBox_DBF_NTX();
valerie99 wrote:
does anybody know when should be release the auto pointer?
Normally - never, since the allocated memory is deleted by std::auto_ptr at scope exit. But if you must, then std::auto_ptr<>::release() is your friend.
--
The Blog: Bits and Pieces
-- modified at 18:10 Monday 26th September, 2005
|
|
|
|
|
Johann Gerell wrote:
That's not the way to use a std::auto_ptr
There can be a good reason for this. Suppose the auto_ptr was declared as a class member and not initialized in the constructor of the class. I have done this from time to time.
John
|
|
|
|
|
The autopointer deletes its associated object when it goes out of scope automatically. To destroy it sooner, call reset().
--
Keep talking! You're the fool, I'm the preacher.
|
|
|
|
|
Hey everyone. I am trying to find a method that will tell me (in an MFC Application) what the last modified time of a folder is. I can get this information fine for a file using CFile's status method, but unfortunately it does not work for folders. Any help would be really appreciated.
|
|
|
|
|
How about ReadDirectoryChanges ?! I don't know what type of application is it that you're dealing with but you can check ReadDirectoryChages out... it's defined in kernel32.dll
|
|
|
|
|
shultas wrote:
I can get this information fine for a file using CFile's status method, but unfortunately it does not work for folders.
Why not?
CFileStatus stat;
CFile::GetStatus("C:\\Program Files", stat);
TRACE("%s\n", stat.m_atime.Format("%x"));
TRACE("%s\n", stat.m_ctime.Format("%x"));
TRACE("%s\n", stat.m_mtime.Format("%x"));
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hello Friends
I am having a dialog based MFC application in which I show internet browser using Microsoft WebBrowser ActiveX control.
Here I want to hid my mouse when I press some button like F3. For this I have used PreTranslateMessage() function and I am able to capture the F3 key press event. And on that event I have written code as SetCursor(NULL) and one boolean variable I m makingit false.
And then in MyDlg::OnSetCursor() function I m returing TRUE if that boolean variable is false. else returning normal
return CDialog::OnSetCursor(pWnd, nHitTest, message);
I am able to hide cursor if I remove Microsoft ActiveX control for Web Browser...What might be the reason and what should I need to do to hide mouse cursor..
Regards,
Raj Mehta
India
|
|
|
|
|
|
Thankx a lot...
It helped me a lot...
Regards
Raj Mehta
India
|
|
|
|
|
Hi,
I am developing a MFC (VC++ 6.0) application which allows users to enter characters in certain editboxes in multiple languages (not multiple scripts in the same text) using IME (Input Method Editor). As a certain requirement I am required to determine a particular with a particular script e.g. Japanese with half katakana script so that the application can take a certain action based on it.
For achieving the above I am handling WM_INPUTLANGCHANGE and WM_INPUTLANGCHANGEREQUEST messages in a standard CWnd derived class's message map which contains visualActiveX (third party) components, I have generated the message handlers using class wizard and have made no modifications to it.
Now the problem I am facing is that the application sometimes successfully determines the changes in input language while fails at other time (no definate pattern here) which is obviously causing some functionality to fail at sometimes.
So what I am looking for is a fool proof way of determining the change in input language and then proceed further depending on the input language. If anyone knows a way to do it kindly let me know ASAP.
And just a point to ponder; could this be the case that sometimes the ActiveX component is eating up the windows messages i.e. passing them to it's default messaging processing since there are no handlers for the WM_INPUTLANGCHANGE and WM_INPUTLANGCHANGEREQUEST messages in the control and can this behavior be due to weired thread synchronisation problem
Thanks in Advance.
|
|
|
|
|
This linker error occurred to me before and I don't know how to deal with it: __beginthreadex and __endthreadex but i'm not using any threads at all. Can somebody please tell me why am i having this kind of error. Thanx
|
|
|
|
|
u need to convert your prog, to multithread cuz a library being used is multithreaded,
do like this,
in the Project Settings , select the 'C/C++' tab.
set ‘Use run-time library’ to either ‘Debug Multithreaded’ (for debug builds) or ‘Multithreaded’ (for release builds).
...and now somebody look into the previous thread...[yelling]
V
|
|
|
|
|
I'm using VC6 but I can't see the 'Use run-time library' in C/C++ tab under Project Settings.
|
|
|
|
|
It's in the Code Generation category.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Ok, I got it, thanx., But why does the error have to occur when my application is not multithreaded after all?
|
|
|
|
|
disinterface is not getting created for my component. i dont find anything starting with a "_"(underscore)ISample" i mean _ISample. how to generate it? can we mannually add a disinterface? please help. time critical!
|
|
|
|