Description
Related to #585, I have been investigating what caused the recent code size increase and it looks like it is due to a few different changes, one of them being the switch to use from_ast
in the translator. For example through bisecting I got it down to this specific commit as one of the offenders: fa2e8b4
For context, when building my firmware commenting out the content of Descriptor::at_derivation_index()
and replacing it with a todo!()
reduces the overall size by 160KiB! Doing the same on an older version of miniscript (9.0.2) decreases the size by 60KiB.
at_derivation_index()
mainly just uses the translator to map keys, and it happens to be the only instance of the translators in use in my code. That's why commenting it out causes LTO to prune all that code and save a lot of space.
I tried reverting that from_ast()
change specifically but unfortunately it didn't make much difference. I'll keep digging but at least we now have a rough idea of where to look...