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

Sai/merged sets #535

Closed
wants to merge 20 commits into from
Closed

Sai/merged sets #535

wants to merge 20 commits into from

Conversation

saiskee
Copy link
Contributor

@saiskee saiskee commented Mar 8, 2024

Description

Please include a thorough summary of the changes.

This fixes ... \ This new feature can be used to ...

Context

Summary of issue

Description and justification of any interesting decisions made

@@ -240,7 +240,183 @@ func (s *{{ $kindLowerCamel }}Set) Clone() {{ $resource.Kind }}Set {
if s == nil {
return nil
}
return &{{ $kindLowerCamel }}Set{set: sksets.NewResourceSet(s.Generic().Clone().List()...)}
return &{{ $kindLowerCamel }}MergedSet{sets: []sksets.ResourceSet{s.Generic()}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main effective change, clone now produces a merged set, which is a a list of sets which is iterated through on methods like Find or List

@@ -152,6 +153,37 @@ func KeyWithSeparator(id ResourceId, separator string) string {
return b.String()
}

func HashedKeyWithSeparator(id ResourceId, separator string) uint64 {
Copy link
Contributor Author

@saiskee saiskee Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a uint64 for the key may reduce key building time and gc time

@saiskee saiskee closed this May 22, 2024
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 this pull request may close these issues.

None yet

1 participant