You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the atoms generated for accessing fields in structs within ex_struct.rs, record.rs, etc., are duplicated for both encode and decode. This increases the amount of code generated considerably for larger structs. For example, when using cargo expand on https://github.com/evnu/NifIo/tree/macos-platform-hack, about 200 lines of code are generated for the atoms alone, which is 1/3 of the overall code. See the expanded code
This could be reduced by generating the atoms only once by generating a helper module and referencing that module from encoders and decoders. I would be up to give that a try, but #234 should be merged before this in order to avoid merge issues.
The text was updated successfully, but these errors were encountered:
Currently, the atoms generated for accessing fields in structs within
ex_struct.rs
,record.rs
, etc., are duplicated for both encode and decode. This increases the amount of code generated considerably for larger structs. For example, when usingcargo expand
on https://github.com/evnu/NifIo/tree/macos-platform-hack, about 200 lines of code are generated for the atoms alone, which is 1/3 of the overall code. See the expanded codeThis could be reduced by generating the atoms only once by generating a helper module and referencing that module from encoders and decoders. I would be up to give that a try, but #234 should be merged before this in order to avoid merge issues.
The text was updated successfully, but these errors were encountered: