BHoM / BHoM_Engine

Internal manipulation of the BHoM
GNU Lesser General Public License v3.0
26 stars 14 forks source link

Versioning_Engine: Move away from pipe system in versioning #3331

Closed IsakNaslundBh closed 5 months ago

IsakNaslundBh commented 5 months ago

Description:

The versioning system currently relies on pipes for running its execution between separate running exe processes for each version. This system was set up as we initially thought each BHoM versioning would rely on a separate version of the BHoM. What we have ended up with, though, is a system where the versioning never relies on any BHoM dll, and is forbidden to do so. THerefor the pipes are not required, and the dlls can instead be loaded up via reflection and upgrade method called directly from the ToNewVersion. Initial investigation shows that this will increase the deserialisation of out of date objects requiring versioning by a factor > 10.

This can be increasingly critical to change after changes like the one made in https://github.com/BHoM/BHoM/pull/1579 where a relatively large model with bars in it saved in Json now could take many minutes to de-serialise rather than a few seconds.

Making a change like this ofc will require substantial testing, but think that will be achievable using our set of objects and methods already used for the versioning check by ensuring switching systems lead to the exact same behaviour for all versions, with the only change being the 10x speed improvement.

Have discussed with @FraserGreenroyd and @adecler offline, and will raise initial PR for this.