finos / morphir-elm

Tools to work with the Morphir IR in Elm.
https://package.elm-lang.org/packages/finos/morphir-elm/latest
Apache License 2.0
45 stars 63 forks source link

Minimize morphir-ir.json file by default. #1097

Closed DamianReeves closed 1 year ago

DamianReeves commented 1 year ago

Is your feature request related to a problem? Please describe. As we've been producing Morphir IRs and we find that the size of the morphir-ir.json file gets rather large and much of the size overhead is actually whitespace.

We find that manually running minimization on the file, actually decrease multi-megabyte files back to the Kb range.

I discussed this with @stephengoldbaum and it makes sense for us to make to make morphir-elm make minimize the JSON file it produces by default.

Describe the solution you'd like Use on of the many JSON minimization libraries available on NPM to minimize the JSON file emitted by the Morphir tooling.

Describe alternatives you've considered N/A

Additional context In morphir-scala we have seen that the large JSON files negatively affect load times both from the download time and the deserialization time. We are trying to apply optimizations where we can, but this will benefit the entire Morphir ecosystem.

cc/ @AttilaMihaly