> ## Content Index
> Fetch the complete content index at: https://nolongerset.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Decompile then Deploy
- URL: https://nolongerset.com/decompile-then-deploy/
- Published: 2020-11-24T02:28:23.000Z
- Updated: 2026-05-08T13:07:39.000Z
- Description: Save disk space and increase startup performance of your program updates by running /decompile before deployment.
- Author: Mike Wolfe
- Tags: Intermediate, #Import 2026-05-20 02:59

Many of my readers will be familiar with the undocumented `/decompile` command line flag. Running Access with this flag and the name of an Access database will strip the compiled "P-Code" from the Access file. 

Most developers use this as a way to recover from corruption. It's obviously well-suited for that. Out of sync VBA source code and compiled P-Code is a major source of corruption in Access databases.

I like to use it in another way, though. Over the past six months or so, I've started running the following command prior to deploying my projects\*:

```
msaccess.exe MyFrontEnd.accdb /decompile /compact /repair
```

The decompile flag strips out the P-Code. The compact and repair flags recover any available space from internal tables.

Why do I do this? Two main reasons: disk size and startup performance.

#### Disk size

Stripping out the P-Code and compacting the .accdb file results in the smallest possible file size for my projects. As I'm usually uploading these files to a web server or copying them to a client server via a VPN, the reduced file size speeds up the process.

This also improves the end user experience, as updates are downloaded faster.

#### Startup performance

Most of my end users are not using the exact same version of Access that I develop with. Without me explicitly decompiling my project, the decompile would happen on the user machine. 

Here's the typical sequence:

1. Open the updated .accdb file
2. Access checks what version of Access compiled the code
3. If the versions differ, Access removes the P-Code from the updated .accdb
4. Access compiles new P-Code from the .accdb's source code

By decompiling the .accdb before distributing, I save the user from having to perform Step 3 above the first time they run the new version. This usually shaves a few seconds off the startup time. While that may seem trivial, I often get phone calls after I distribute a new version of one of my programs because, "Something must be wrong...it took longer than usual to open." Decompiling saves me those phone calls.

\* I do not distribute compiled .accde or .mde files to my users. My reasons for that are beyond the scope of this article.

*Image by [Free-Photos](https://pixabay.com/photos/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=336507) from [Pixabay](https://pixabay.com/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=336507)*