[cfggen] Remove NatSorted#5601
Conversation
|
good improvement. is there a way to make sure the natsorted is not introduced again in the future accidentally? it is easier missed. especially, I am a little concern that if one of the dependency packages that sonic-cfggen uses will introduce natsorted. this is not a real concern for this pr. it is about future-proofing. |
2547f4b to
26d5c1a
Compare
Thanks! I am aware of putting a package on hold using apt |
|
We use the natsort package in other packages like sonic-utilities and sonic-py-common, so we need to continue installing it in the host OS. I don't think there's any way we can prevent it from being re-introduced to sonic-cfggen other than being attentive to code reviews. Maybe add documentation somewhere? |
Natural sorting of SONiC config gen output consumes lot of CPU cycles. The sole use of natsorted was to make test comparison easier and so, the natsorting logic is now relocated to the test suite. As a result sonic-cfggen gained nearly 1 sec per call since we no longer import natsorted module! singed-off-by: Tamer Ahmed <[email protected]>
26d5c1a to
975cf35
Compare
Natural sorting of SONiC config gen output consumes lot of CPU cycles. The sole use of natsorted was to make test comparison easier and so, the natsorting logic is now relocated to the test suite. As a result sonic-cfggen gained nearly 1 sec per call since we no longer import natsorted module! singed-off-by: Tamer Ahmed <[email protected]>
Natural sorting of SONiC config gen output consumes lot of CPU cycles. The sole use of natsorted was to make test comparison easier and so, the natsorting logic is now relocated to the test suite. As a result sonic-cfggen gained nearly 1 sec per call since we no longer import natsorted module! singed-off-by: Tamer Ahmed <[email protected]>
Natural sorting of SONiC config gen output consumes lot of CPU cycles. The sole use of natsorted was to make test comparison easier and so, the natsorting logic is now relocated to the test suite. As a result sonic-cfggen gained nearly 1 sec per call since we no longer import natsorted module! singed-off-by: Tamer Ahmed <[email protected]>
Natural sorting of SONiC config gen output consumes lot of CPU cycles.
The sole use of natsorted was to make test comparison easier and so,
the natsorting logic is now relocated to the test suite. As a result
sonic-cfggen gained nearly 1 sec per call since we no longer import
natsorted module!
singed-off-by: Tamer Ahmed [email protected]