-
Notifications
You must be signed in to change notification settings - Fork 170
pkg/list: Sort is too slow #745
Comments
Is this something you found in practice or just when playing around? We are aware of slowness in various places, but we tend to prioritize actual use cases. |
The use case is outputting a predictable yaml output when generating kubernetes configs so that we can diff the produced changes on PRs. It turned out that a few simple sorts are actually not enough for this anyway, so I'm using this yq command to clean the output of cue and make it git diffable: |
Would it be useful to have a semantic diff? There is an internal diff package in the CUE, but we could expose it as a package and or command. If the latter, you could comment on Issue #8 on how you think this would best look like. |
I'll comment on #8 because that's closer to my use case. |
This issue has been migrated to cue-lang/cue#745. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
yes
What did you do?
Baseline:
root.cue
Run:
Replace the last line with this list.Sort command to see the performance impact of using list.Sort in this config:
Run:
What did you expect to see?
10x slow down
What did you see instead?
negligible performance difference
The text was updated successfully, but these errors were encountered: