TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.56k stars 244 forks source link

OS-8428 sysinfo may fail on strings "sanitized" by smbios but are toxic to json #1065

Closed bahamat closed 1 year ago

bahamat commented 1 year ago

@danmcd Ok, after your comment I did some benchmarking and it turns out that calling node 8 times increased the run time by 0.5s-1s.

I decided to try rewriting it. I ran the original version and my new version each 100x. The old version runs on average 1.210s, with stdev of 0.013s. The new version now runs on average 1.258s, with stdev of 0.011.

So of my tests with this new version, we're on average 1/20ths slower.

bahamat commented 1 year ago

Customer reports that this version also works.

danmcd commented 1 year ago

Adding IA based on email. See if someone else will review if possible.