hypar-io / Elements

The smallest useful BIM.
https://www.hypar.io
MIT License
347 stars 74 forks source link

Separate structural profiles to reduce package size. #1075

Open ikeough opened 8 months ago

ikeough commented 8 months ago

BACKGROUND: During performance optimization of Hypar, we've found that lambda cold start times are proportional to package size. Analysis of the build folder of Elements revealed that Microsoft.CodeAnalysis.CSharp and Microsoft.CodeAnalysis.CSharp.Scripting and their associated per-language files were adding significant size to the build output. These dependencies were only required for the ParametericProfile class which is the base class for all structural profiles.

DESCRIPTION: This PR creates the Elements.Structure project which moves all structural profile factories and types to a separate project. It also removes the Textures folder as this is only used for testing. This reduces the build output size from 18mb to 7.2mb.

TESTING:

FUTURE WORK:

REQUIRED:


This change is Reviewable