This page is dedicated to helping Dephi programmers build fast/stable applications. It is intended for beginner
to intermediate developers.
- Always surround the code to fill the listbox derived component with a ListBox.BeginUpdate and ListBox.EndUpdate.
A speed hit comes from windows redrawing the listbox everytime you add a new item.
- Try to save to network as little as possible.
- Use ranges on tables instead of filters or SQL queries whenever possible, they are much faster.
- Make sure you have an index on each field involved in a filter.
- For simple searches use findkey instead of a query whenever you have an index on the searched field(s), it's
a lot faster.
- FindKey works best when using the primary index.
- Scalers (integer etc.) must use 0 not null for empty values.
- Set RequestLive to True.
- Make sure you have an index on each field involved in a join or in the WHERE clause of a query.
- Order SQL WHERE clauses so that the smallest tables come first.
- When a field has a case-insenstitive index you should use the SQL
UPPER function with queries. eg. WHERE UPPER(Name)="ALLAN"
- Only do TDBISAMDataset.Refresh on views not updates. Before an update the dataset is automatically refreshed.
- Use FlushBuffers after a Post (not needed for transactions) to prevent table corruption.