Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance of decode hook #30

Closed
Succo opened this issue Jun 19, 2024 · 1 comment · Fixed by #33
Closed

Performance of decode hook #30

Succo opened this issue Jun 19, 2024 · 1 comment · Fixed by #33

Comments

@Succo
Copy link

Succo commented Jun 19, 2024

Hello, thanks for having taken the time of forking https://github.com/mitchellh/mapstructure/

When using the original project noticed the dynamic decode hook was an expensive part of decoding due to it using reflect on the hook on each pass. Which can happens a lot due as soon as you have slices or nested struct.

I had opened this PR mitchellh#324 to pre compute the hook to typed method.

I think it would be easy to port to the fork, is that something that would interest you ? (In which case I would be interested in helping 😄 )

Fabrice

@sagikazarmark
Copy link
Member

Apologies for the late answer (vacations and all).

Looks like someone already ported this from the original repo: #33

I'm inclined to accept it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants