Application Slowdown
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Application Slowdown
Hi,
I dont think this is a FiveWin problem, but I will ask the question here..
At one of my customers (who have 6 installations), my application gets slower and slower as they use it through the day - if they go out of the application and go back in the application runs at normal speed.
They cannot tell me what causes the slowdown as they do many things in the application.
Is there any reporting tools to see what could be causing the slowdown (memory/resources etc)
I'm not expecting a "do this to fix" response, just ideas
I have posted this on the xHarbour forums but havent had any replies
I'm using xHarbour commercial June 2010 & SQLRDD , FWH 06.10
Any ideas would be appreciated
Best regards,
Pete
I dont think this is a FiveWin problem, but I will ask the question here..
At one of my customers (who have 6 installations), my application gets slower and slower as they use it through the day - if they go out of the application and go back in the application runs at normal speed.
They cannot tell me what causes the slowdown as they do many things in the application.
Is there any reporting tools to see what could be causing the slowdown (memory/resources etc)
I'm not expecting a "do this to fix" response, just ideas
I have posted this on the xHarbour forums but havent had any replies
I'm using xHarbour commercial June 2010 & SQLRDD , FWH 06.10
Any ideas would be appreciated
Best regards,
Pete
Re: Application Slowdown
Hi,
Please add SetResDebug( .T. ) al the start of your app and CheckRes() before exiting.
Also, I have noticed that soemtimes FWH loses bitpams in RIBBON BAR.
Hope it helps
Please add SetResDebug( .T. ) al the start of your app and CheckRes() before exiting.
Also, I have noticed that soemtimes FWH loses bitpams in RIBBON BAR.
Hope it helps
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: Application Slowdown
I see that it creates a res.log - what does the contents show me?
This forum is so much better than the xHarbour commercial forum - i posted my first message on there in June 2010 and have yet to receive any suggestions - on here i have help in just over half an hour
This forum is so much better than the xHarbour commercial forum - i posted my first message on there in June 2010 and have yet to receive any suggestions - on here i have help in just over half an hour
Re: Application Slowdown
The controls that have not been propely ended.
I think the best compiler is Harbour and of course, this forum is the best support for Harbour Guis.
I think the best compiler is Harbour and of course, this forum is the best support for Harbour Guis.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Re: Application Slowdown
Hello Peter,
You can use this free Tool, to check and optimize the memory to find out Problems
of running Applications without any changes of Your own Application.
It runs in the Background and can optimize the Memory in Intervall and shows the used Memory.
Maybe another running Application is the Reason for the memory-problems.
Before You start, to check inside Your Application, You can do a Test with this Tool,
because on several other Customer-Computers it is working fine ?
All Tools :
http://www.rizone3.com/
Memory-Booster :
http://www.rizone3.com/archives/27
This method will not free up a big amount of RAM, but instead will,
improve the stability and performance of your computer.
This will also cure memory leaks and in some cases has been able to unfreeze programs.
Because it uses a Windows API call, you know that it’s safe to run.
You don’t need to install Memory Booster.
Just unzip the files to your desired location and run ‘MemBoost.exe’.
Memory Booster stores all settings in the application folder and will not write anything to the Registry.
![Image](http://www.pflegeplus.com/pictures/memory_1.jpg)
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
You can use this free Tool, to check and optimize the memory to find out Problems
of running Applications without any changes of Your own Application.
It runs in the Background and can optimize the Memory in Intervall and shows the used Memory.
Maybe another running Application is the Reason for the memory-problems.
Before You start, to check inside Your Application, You can do a Test with this Tool,
because on several other Customer-Computers it is working fine ?
All Tools :
http://www.rizone3.com/
Memory-Booster :
http://www.rizone3.com/archives/27
This method will not free up a big amount of RAM, but instead will,
improve the stability and performance of your computer.
This will also cure memory leaks and in some cases has been able to unfreeze programs.
Because it uses a Windows API call, you know that it’s safe to run.
You don’t need to install Memory Booster.
Just unzip the files to your desired location and run ‘MemBoost.exe’.
Memory Booster stores all settings in the application folder and will not write anything to the Registry.
![Image](http://www.pflegeplus.com/pictures/memory_1.jpg)
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
Last edited by ukoenig on Wed Jan 26, 2011 12:48 pm, edited 8 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: Application Slowdown
The trouble is that we have invested a lot of development into SQLRDD so we have to use xHarbour
Thats a bit worrying - i open my app and close is straight away and I have a file with 66 lines in - all the app is doing at that stage is opening tables, opening a buttonbar and displaying a bitmap - i noticed that there is a line with brush and as far as i know i dont use any brushes in this app
Thats a bit worrying - i open my app and close is straight away and I have a file with 66 lines in - all the app is doing at that stage is opening tables, opening a buttonbar and displaying a bitmap - i noticed that there is a line with brush and as far as i know i dont use any brushes in this app
Re: Application Slowdown
Pete,
Maybe you should update your FWH. Your version is already 5 years old.
I have some customers by whom my application is used by more than 30 users on their network. If I remember well, I once had a similar problem but that dissappeared after an update of FWH.
Often that kind of problems are caused by the antivirus software used by your customer. You should try to disable the antivirus software and check if some different behaviour is experienced.
Good luck.
Maybe you should update your FWH. Your version is already 5 years old.
I have some customers by whom my application is used by more than 30 users on their network. If I remember well, I once had a similar problem but that dissappeared after an update of FWH.
Often that kind of problems are caused by the antivirus software used by your customer. You should try to disable the antivirus software and check if some different behaviour is experienced.
Good luck.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: Application Slowdown
Sorry got the numbers around the wrong way for the FW version should be 10.06
I can ask about the AV, but they are a big company and probably wont allow to turn off the AV
![Laughing :lol:](./images/smilies/icon_lol.gif)
I can ask about the AV, but they are a big company and probably wont allow to turn off the AV
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Application Slowdown
Peter
I went through a similar situation and i monitored the resources
At the beginning of my application i have (it is still there)
SetKey( VK_F11, { || FERASE("CHECKRES.TXT"),CHECKRES() } )
When i go into a similar situation , i make the user press f11 and send me the file
Checking the file, one of my printing programs was not releasing a font and that was the problem when this function was used often and often during the day
HTH
Richard
I went through a similar situation and i monitored the resources
At the beginning of my application i have (it is still there)
SetKey( VK_F11, { || FERASE("CHECKRES.TXT"),CHECKRES() } )
When i go into a similar situation , i make the user press f11 and send me the file
Checking the file, one of my printing programs was not releasing a font and that was the problem when this function was used often and often during the day
HTH
Richard
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: Application Slowdown
I Have searched all of my source code and i do not use a brush yet the res.log file says that there are three - is there a way of releasing these or do i have to find where in the code these are being defined?
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Application Slowdown
Peter,
This is most likely a bug in the FWH code. One way to isolate where it is happening is to comment out about half of the code you are running, then test again. This will tell you which half of your code is causing the problem. Then comment out half of the problem code to isolate it to 1/4 of your code. Eventually you will find the line(s) causing the problem and then you can try to find what FW source contains the bug.
RE: Antivirus software
From your description of increasing slowness I don't think this is your problem but be advised that AV software should be set to ignore databases and indexes. Otherwise every time a record is saved the entire database will be scanned.
Regards,
James
I Have searched all of my source code and i do not use a brush yet the res.log file says that there are three - is there a way of releasing these or do i have to find where in the code these are being defined?
This is most likely a bug in the FWH code. One way to isolate where it is happening is to comment out about half of the code you are running, then test again. This will tell you which half of your code is causing the problem. Then comment out half of the problem code to isolate it to 1/4 of your code. Eventually you will find the line(s) causing the problem and then you can try to find what FW source contains the bug.
RE: Antivirus software
From your description of increasing slowness I don't think this is your problem but be advised that AV software should be set to ignore databases and indexes. Otherwise every time a record is saved the entire database will be scanned.
Regards,
James
Re: Application Slowdown
Hi,
I have set up SetResDebug( .T. ) and Checkres() to, for example, ribbon2.prg sample and there are many objects not released.
Why does occur?.
I beleived FWH handles that!!
Thank you-
I have set up SetResDebug( .T. ) and Checkres() to, for example, ribbon2.prg sample and there are many objects not released.
Why does occur?.
I beleived FWH handles that!!
Thank you-
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Application Slowdown
UKService,
I looked at the fw\samples\ribbon2.prg example and there is some poor coding in it. It does not release a number of fonts, brushes, and bitmaps that it creates. This has nothing to do with the ribbonbar class and its associated classes.
If you have defined your ribbonbar similarly to ribbon2.prg then perhaps you have the same problem. Mainly there are several NOWAIT dialogs that are defined in functions using LOCAL fonts, brushes, and bitmaps. These resources need to be destroyed when the main app is ended but the locals cannot be accessed by the main app.
The best solution would probably to write the app as a class and have three arrays as data of the app; one array for fonts, one for brushes and one for bitmaps. Then the End() method of the app class could destroy all these resources.
HOWEVER, I don't think this is the reason for your app slowing down. These resource are only defined once per application run. I think you have resources that are defined every time a certain function or routine is called and those resources are never released.
Here is a test. Add checkres() to the end of your app. Open the app, then immediately close it. Ideally, there should be no unreleased resources in the file, but if there are, just ignore them for now. Keep a copy of the checkres() file. Now, run the app again and perform several routines, then close it again. Now compare the previous and current checkres.txt files. I expect you are going to see some new resources that were not in the first file. These are part of the problem.
You can isolate certain routines by erasing the checkres.txt file at the beginning of the routine, and calling checkres() at the end of the routine.
Regards,
James
I looked at the fw\samples\ribbon2.prg example and there is some poor coding in it. It does not release a number of fonts, brushes, and bitmaps that it creates. This has nothing to do with the ribbonbar class and its associated classes.
If you have defined your ribbonbar similarly to ribbon2.prg then perhaps you have the same problem. Mainly there are several NOWAIT dialogs that are defined in functions using LOCAL fonts, brushes, and bitmaps. These resources need to be destroyed when the main app is ended but the locals cannot be accessed by the main app.
The best solution would probably to write the app as a class and have three arrays as data of the app; one array for fonts, one for brushes and one for bitmaps. Then the End() method of the app class could destroy all these resources.
HOWEVER, I don't think this is the reason for your app slowing down. These resource are only defined once per application run. I think you have resources that are defined every time a certain function or routine is called and those resources are never released.
Here is a test. Add checkres() to the end of your app. Open the app, then immediately close it. Ideally, there should be no unreleased resources in the file, but if there are, just ignore them for now. Keep a copy of the checkres() file. Now, run the app again and perform several routines, then close it again. Now compare the previous and current checkres.txt files. I expect you are going to see some new resources that were not in the first file. These are part of the problem.
You can isolate certain routines by erasing the checkres.txt file at the beginning of the routine, and calling checkres() at the end of the routine.
Regards,
James
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: Application Slowdown
OK, I have done some tests by placing SetResDebug( .T. ) before a routine and CheckRes() after, here are my findings:
A routine that just calls Msginfo() creates a res.log that contains this:
I then placed the code before and after i open a dialog that contains a listbox and three BTNBMP with a bitmap from resource, this returns this:
If i comment out the BTNBMP, i get this:
So i would say that BTNBMP (and maybe Msginfo) is leaving something behind - should i be destroying the BTNBMP somehow (if so, how?) after i close the dialog?
Any advice would be appreciated
Pete
A routine that just calls Msginfo() creates a res.log that contains this:
Code: Select all | Expand
0
BRUSH
0
0
0
0
0
0
0
0
0
I then placed the code before and after i open a dialog that contains a listbox and three BTNBMP with a bitmap from resource, this returns this:
Code: Select all | Expand
0
BRUSH
0
BMP
0
PAL
0
BMP
0
PAL
0
BMP
0
BRUSH
0
0
0
If i comment out the BTNBMP, i get this:
Code: Select all | Expand
0
BRUSH
0
0
0
0
0
0
0
0
0
So i would say that BTNBMP (and maybe Msginfo) is leaving something behind - should i be destroying the BTNBMP somehow (if so, how?) after i close the dialog?
Any advice would be appreciated
Pete
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Application Slowdown
Pete,
If you are calling checkres() before the dialog is closed then it is meaningless. You have to call it AFTER the dialog is closed.
Did you try my other tests?
Regards,
James
I then placed the code before and after i open a dialog
If you are calling checkres() before the dialog is closed then it is meaningless. You have to call it AFTER the dialog is closed.
Did you try my other tests?
Regards,
James