Closed didimitrie closed 6 years ago
This is now fixed. Not sure if it's an enhancement or a downgrade in performance, so there's still testing to do. Nevertheless, the lazy developer can just do
SpeckleObject myObj = SpeckleCore.Converter.Serialise( anyObject ) ;
And she/he will get a null in case of nuclear disaster, or a SpeckleAbstract
if no conversion method is defined in any loaded assembly, or a converted speckle object if a ToSpeckle
extension method is found in any of the loaded assemblies that contain "Speckle" and "Converter" in their names.
Problem: it seems to be slower than expected, but then again - this all happens in the background, so...
I'll close for now, as it seems like main performance bottleneck was in the rhino selection events :/ (https://github.com/speckleworks/SpeckleRhino/issues/106)
Speckle Core converter should be the single point of contact for conversions, and the application specific converters should just add extension methods to their types, for which the core converter will look into.
Flow as it is now:
Flow as it can be:
Simpler clearer and less switches! Or just switching problems around? 🤔