Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance improvement techniques in Delphi 6

Status
Not open for further replies.

sachinvk

IS-IT--Management
Oct 21, 2004
2
0
0
US
Hi all,

Is anybody having idea how to improve performance with large delphi 6 application. Are there any code optimisation ways available in Delphi 6. Usually, our application (exe size 12 MB)takes a lot of time to move from one form to another as there are many controls and validations are present. In LAN, it takes almost few seconds to move from one control to other on same form. We are using SQL server as database. Any pointers for fast algorithms, data structure use etc will be hihgly appreciated.

rgds,
sachin
 
Seems to me that you first need to look at your network and database first. Serious, Delphi is extremely fast when it switches between forms. Seems to me that you use the database in the wrong way.

Now how can you expect people to advice you if all they know is that you use SQL server? Be serious will ya.
 
I think what justsomeone is saying is that we need you to supply us with more information to enable us to help you effectively.

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
What type of application is this? Microsoft word takes about 10 MB (and it does a lot of things).

Some points:

1)Review your visual appearance. Decide on a motif that the user recognizes. In every MS-office application the first Menu item is File, and exit or close will be located also there. Other wide spread motifs are Corel Perfect Office and Lotus SmartSuite.
The obvious reason for adhering to an already established user interface motif is that your users will enjoy instant familiarity with your application.

2) Don't add unneeded (graphical!!) features. Inundating your client with useless information waste everybodies time (including yours). Until now I didn't see the advantages of spin-edits, don't let the user run around the screen with a mouse to get things done. To often nifty interface elements determine what functions make it into an application. Best thing, pretend that you are the user, if you have to eat what you cook yourself, you will be very selective.

3)Give large mouse targets. Large buttons and easily located radio button groups make applications easier to navigate than a form that is chock-full of microscopic controls.

3) You are using SQL-Server, let it work for you. Data validation, security, access control, SQL-Server and other RDBMS were build to handle the bussiness rules.

4) Use queries instead of tables (especially on big tables). What might work in access or paradox will probably not work for Client-Server systems.

5) Remove list components and other data-entry niceties if the form/application reads but not write data. Use dbtext to conserve system resources.

Regards

Steven van Els
SAvanEls@cq-link.sr
 
A 12 MEG app is a clue explaining why it is slow. Look at the dpr. How many forms have Application.CreateForm between Application.Initialize and Application.Run? If more than one, why? Create forms as needed in the main and child forms then Free them when you are done with them.

How may data-aware forms have TTable and TDataSource components on them? How many times have you duplicated them on other forms? Get rid of them. Utilize TDataModule and put them all there. Use multiple TDataModules if you prefer to organize tables by categories or groups.

Roo
 
Is the app so big because of your compiler settings?
Make sure you have optomisation ON and Stack frames OFF, range checking OFFand debug info OFF in your distributable. to minimise size.
If you are storing data in a form/module or if it needs to interact in some other ways with the main form of your appliction, its not always possible(or should I say easy) to leave it out of Auto create.






Steve
Be excellent to each other and Party on!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top