Say you have a large model with more than 500 mapped tables. Surely you will notice how the designer becomes a little unresponsive on saving. There is a simple explanation for this. 

By default OpenAccess generates a file per class. Everytime you perform a save on the document code generation of all files is performed. This is basicaly generating content for each and every file, comparing this contect with the one from the old file if available, and based on that writing it to the file system. And let’s of course not forget that we should also take into account the performance overhead caused by the source control.

This sequence is executed for every class in the model. In this case more than 500 files will be generated and this could really hurt the performance.

However there is a simple approach to solving this issue. Just open the model settings dialog and on the code generation tab uncheck the Generate multiple files checkbox. This would ensure that the above sequence is only executed once and all of the content is generated in a single file.

This will speed the save operation by up to 8 times. 

Stay tuned for more tips on working with OpenAccess.

About the Author

Damyan Bogoev

Damyan Bogoev is Senior Software Developer in OpenAccess ORM Team


Comments are disabled in preview mode.