•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 375,216 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,319 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser:
Views: 725 | Replies: 9
![]() |
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,738
Reputation:
Rep Power: 10
Solved Threads: 173
Hi all.
I'm writing a little program that paints and animates its own form in response to the user's mouse gestures. The weird thing is:
Whenever the BDS Delphi 2006 is running and I run my application, I get a framerate of about 25 FPS. If I terminate BDS but not my application the framerate stays high.
However, if I then restart my application when BDS is not running my application runs at about 11 FPS. This is without any change to the code or executable. (This also seems to me to be a little backwards... alas.)
I've recompiled my app using Delphi 5 and it still gets the slow framerate. My only conclusion is that BDS is doing something to the system or loading some Borland/Codegear shared module that is bumping performance?
In short, does anyone know why this is happening? And where I should look to make my application get the higher framerate?
Thanks
I'm writing a little program that paints and animates its own form in response to the user's mouse gestures. The weird thing is:
Whenever the BDS Delphi 2006 is running and I run my application, I get a framerate of about 25 FPS. If I terminate BDS but not my application the framerate stays high.
However, if I then restart my application when BDS is not running my application runs at about 11 FPS. This is without any change to the code or executable. (This also seems to me to be a little backwards... alas.)
I've recompiled my app using Delphi 5 and it still gets the slow framerate. My only conclusion is that BDS is doing something to the system or loading some Borland/Codegear shared module that is bumping performance?
In short, does anyone know why this is happening? And where I should look to make my application get the higher framerate?
Thanks
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,738
Reputation:
Rep Power: 10
Solved Threads: 173
Hey, thanks for the reply.
No, I haven't used the control panel. I've directly timed it as: (number of paint events)/(milliseconds elapsed) while scrolling.
The point is that my executable is not modified in any way between testing with BDS running and testing without BDS running. Yet, my executable performs better when BDS is running.
Which means to me that BDS must be doing something either to the system or to the in-memory libraries common to both my application and BDS to make things faster. I can't figure out what that is though...
No, I haven't used the control panel. I've directly timed it as: (number of paint events)/(milliseconds elapsed) while scrolling.
The point is that my executable is not modified in any way between testing with BDS running and testing without BDS running. Yet, my executable performs better when BDS is running.
Which means to me that BDS must be doing something either to the system or to the in-memory libraries common to both my application and BDS to make things faster. I can't figure out what that is though...
I was thinking that the processes window i the Control Panel would give you a view of what else is running when BDS is. A comparison of process with and without BDS might give you a hint. Also, does your program run slow if BDS was running and then shut down, as opposed to having never run between start-ups/log-ons?
•
•
Join Date: Jun 2006
Location: Blumenau, Brazil
Posts: 67
Reputation:
Rep Power: 3
Solved Threads: 4
•
•
•
•
I was thinking that the processes window i the Control Panel would give you a view of what else is running when BDS is. A comparison of process with and without BDS might give you a hint.
I recommend Process Explorer v11.13, freeware from Microsoft.
Another point, like process priority - maybe BDS is (or put you program to) running with priority above normal.
Douas, you are using only a paint method? (nothing like DirectX, OpenGL... methods)
Bye
"It always has, at least, two ways to make one same thing. Exactly that they are certain and wrong"(Micheus)
Brazil - Blumenau
Brazil - Blumenau
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,738
Reputation:
Rep Power: 10
Solved Threads: 173
Thanks for the info. That Process Explorer is slick.
Alas, I don't really know what I am looking for. As far as I can tell, my application and BDS don't share anything... (except some non-relocated kernel DLLS).
Other than that, all I know at this point is that my application runs more than twice as fast when BDS is in memory than when it is not.
The following behavior might be of interest:
1. Start BDS, then my app. Stop BDS. My app stays fast. Restart my app and it is slow again.
2. Start my app, then BDS. Stop BDS. My app becomes slow again.
3. BDS is always fast.
Arrgh!
Alas, I don't really know what I am looking for. As far as I can tell, my application and BDS don't share anything... (except some non-relocated kernel DLLS).
Other than that, all I know at this point is that my application runs more than twice as fast when BDS is in memory than when it is not.
The following behavior might be of interest:
1. Start BDS, then my app. Stop BDS. My app stays fast. Restart my app and it is slow again.
2. Start my app, then BDS. Stop BDS. My app becomes slow again.
3. BDS is always fast.
Arrgh!
•
•
Join Date: Jun 2006
Location: Blumenau, Brazil
Posts: 67
Reputation:
Rep Power: 3
Solved Threads: 4
•
•
•
•
The following behavior might be of interest:
1. Start BDS, then my app. Stop BDS. My app stays fast. Restart my app and it is slow again.
It sounds similar to a dll module load by an application...
•
•
•
•
2. Start my app, then BDS. Stop BDS. My app becomes slow again.
I had think about GDI and GDI+, but I can't found some logica explanation to this case.
All graphical functions declared on Windows unit made reference to the GDI32.DLL. The GDI+ (GDIPlus.DLL) improve GDI... maybe the BDS was load GDI+... but this make no sense.
Sorry don't help you more. Maybe jsosnowski has some an other sugestion.
Good luck.
"It always has, at least, two ways to make one same thing. Exactly that they are certain and wrong"(Micheus)
Brazil - Blumenau
Brazil - Blumenau
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,738
Reputation:
Rep Power: 10
Solved Threads: 173
That's my thought exactly. I just can't figure out what BDS is doing... But I'll take a look at the GDI+.
I'm wondering if BDS is doing some sort of in-memory modification of one of the shared DLL's? (But that makes no sense either, because each process gets its own copy...) Is isn't overclocking my CPU or anything... aarrrrrghhhh.
I've also compiled with RtlVclOptimize.pas and I'm considering adding FastCode also...
I'm wondering if BDS is doing some sort of in-memory modification of one of the shared DLL's? (But that makes no sense either, because each process gets its own copy...) Is isn't overclocking my CPU or anything... aarrrrrghhhh.
I've also compiled with RtlVclOptimize.pas and I'm considering adding FastCode also...
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,738
Reputation:
Rep Power: 10
Solved Threads: 173
It is a possibility. It occurs to me that there might be something happening with the paging file or somesuch...
I wrote the program to operate off of a CD (via autoplay). I got the display rate sufficient to use, and the time came for me to give it to my friend (as a birthday gift), so I burnt it to CD and tested the CD, and the display rate went up to about 13 FPS.
Alas.
I wrote the program to operate off of a CD (via autoplay). I got the display rate sufficient to use, and the time came for me to give it to my friend (as a birthday gift), so I burnt it to CD and tested the CD, and the display rate went up to about 13 FPS.
Alas.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Pascal and Delphi Marketplace
- Previous Thread: Urgent Help PLZ
- Next Thread: My program keeps crashing



Linear Mode