Skip to content

Commit fc0b882

Browse files
Merge pull request #8488 from tknippenberg/ShrinkMPRBasics
Added basic steps for shrinking MPR
2 parents 667c963 + 3951551 commit fc0b882

File tree

1 file changed

+8
-0
lines changed
  • content/en/docs/refguide/version-control/version-control-troubleshooting

1 file changed

+8
-0
lines changed

content/en/docs/refguide/version-control/version-control-troubleshooting/repository-size.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ This means that when you change one document, for example a page, that only the
5252
Manually modifying files belonging to the [*.mpr* storage format](/refguide/version-control/#mpr-format) such as the *.mpr* file or the *mprcontents* directory (for example, when resolving file conflicts through third-party tooling), will lead to a corrupted state. To recover from a corrupted state a previous commit will need to be restored.
5353
{{% /alert %}}
5454

55+
#### Decreasing MPR File Size
56+
57+
When a file exceeds the Git compression threshold, 512 MB by default, Git will store a full copy of the file with each new revision instead of only storing the delta. This results in extremely rapid repository growth with both client and server-side consequences.
58+
59+
As the Mendix model is stored in a single file, this threshold can be exceeded by the *.mpr* file. To decrease the MPR file size, you consider doing the following:
60+
* Remove [excluded and unused documents](/refguide/dev-best-practices/#excluded-and-unused-documents) – If you have a large number of unnecessary documents in your app model, this can significantly increase the size of the MPR file.
61+
* Decrease duplication in pages – If you have a number of pages featuring the same content, such as an advanced datagrid, consider extracting this piece of logic to a widget. Reusing a widget on multiple pages prevents the data from being saved several times and can have a large impact on the size of the MPR file.
62+
5563
### Working with a Large Repository Size
5664

5765
When cloning an app, the default behavior of Git is to download the full history. As Mendix uses different folders on disk for different branches, downloading full history is done for each branch. To mitigate that, Mendix uses local cloning for subsequent branch downloads. When cloning a new branch, data from a local branch you already have is used to reduce data that needs to be downloaded.

0 commit comments

Comments
 (0)