fluent-nhibernate icon indicating copy to clipboard operation
fluent-nhibernate copied to clipboard

Changes to speed up Configuration

Open cedar-cranson opened this issue 4 years ago • 1 comments

Our object model has way too many model classes which I recognize is a problem but would like for it to start up as fast as possible. Here are three small changes that speed up our configuration a lot.

First is putting creation of MappingXmlFile into a parallel stream for my computer and our large object model. This reduced start up by about 7 seconds (this change also has the benefit on my computer of making the time to run all of the Fluent Tests from 17 seconds to 10 seconds).

The second change is putting the creation of the mapping classes into a parallel stream for my computer and our large object model. This reduced start up by about 10 seconds.

The third change is to extract property.Name into a var so it does not have to be executed every time inside of the Any loop. This reduced our startup by about 8 seconds.

Please let me know if you have any questions or would like more information. Thanks

cedar-cranson avatar Nov 15 '21 17:11 cedar-cranson

Pushed up a change so number of threads can be set when configure is called.

I did not mean to click the merge button and am sorry if that causes any issues. Hopefully nothing happened because I do not have write access but very sorry if it did cause any work.

Thanks

cedar-cranson avatar Jan 20 '22 15:01 cedar-cranson