MS-Access / Getting Started

Eliminating dead code and unused variables

Before distributing your application, remove any dead code (code that isn't used at all) from your application. You'll often find entire procedures or even modules that once served a purpose but are no longer called. Also, it's quite common to forget to remove variable declarations after removing code using the variables. By eliminating dead code and unused variables, you reduce the memory your application uses and the time required to compile code at runtime.

Other things that you can do to increase the speed of your modules include opening any add-ins that your application uses for read-only access and replacing procedure calls within loops with inline code. Also, don't forget one of the most important items: Deliver your applications with the modules compiled.

Increasing network performance

The single most important action that you can take to make sure that your networked databases run at peak performance is to run Access and the application database on the user's computer and link tables to the shared network database. Running Access over the network is much slower than running it locally.

When using Jet or ACE as the database engine, an Access application can run only so fast. With Jet or ACE, each time you open a table, run a query, or perform an operation on data, all the data referenced by the process or query must be moved from the data database (assuming that you've split your program and data database files) to the computer running the program. This may mean moving a lot of data across the network. In contrast, an Access project using the Microsoft SQL Server or SQL Server Express Edition can use stored procedures to minimize network traffic, drastically speeding up most Access applications.

Tip: If you're working with large amounts of data, consider using SQL Server as your back-end database file.

[Previous] [Contents] [Next]