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

replace Strings that are passed around with Iota #736

Open
igalic opened this issue Feb 7, 2024 · 1 comment
Open

replace Strings that are passed around with Iota #736

igalic opened this issue Feb 7, 2024 · 1 comment

Comments

@igalic
Copy link

igalic commented Feb 7, 2024

Description:

Currently, we have a lot of strings that denote meaning that are being passed around a lot.

We should replace those with a Iotas. This should give us a small performance boost.

If they do need to be used as actual strings, we can implement a toString function for that: https://golangbyexample.com/iota-in-golang/

@purpleidea
Copy link
Owner

Some context: This was discussed in our CfgMgmtCamp hackathon... The idea was that by using an iota to store the resource kind, we'd save a bunch of memory by not holding the "string" everywhere.

Thanks @igalic for writing it up!

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

No branches or pull requests

2 participants