fhir-sdk icon indicating copy to clipboard operation
fhir-sdk copied to clipboard

Improve compile time and its resource usage

Open FlixCoder opened this issue 1 year ago • 1 comments

I want to experiment with my own Serialize/Deserialize implementation to see if that fixes some of it.

FlixCoder avatar Jan 13 '24 13:01 FlixCoder

Switching back to derive_builder made up for a lot of the compile time resources, so now it is mostly serde. But it turns out, there is not too much up for grabs, so unsure whether it can be fixed with a manual serde implementation..

FlixCoder avatar Jan 13 '24 21:01 FlixCoder

Hi @FlixCoder,

Was this closed as a won't do or are there some improvements in the 0.14.0 release?

fage88 avatar Aug 27 '24 15:08 fage88

Was this closed as a won't do or are there some improvements in the 0.14.0 release?

Neither nor @fage88 . As the previous comment said, going back to runtime builders instead of compile time builders helped a bit. But any further action would hamper features seriously, e.g.

  • No builders at all, super unergonomic
  • Experiment with custom serde implementation. Likely low rewards for very high effort

I was thinking about using fhirbolt's models as that compiles faster, but it doesn't have the necessary features (traits, code enums, builders) and isn't actively maintained currently.

So I just don't know how to improve compile times, if anyone has ideas, please try it out and/or open an issue :D

Given this isn't really actionable right now (rustc just eats the resources with that many big structs and serde derives) I closed it for now

FlixCoder avatar Aug 27 '24 15:08 FlixCoder