sdinteractive / SomethingDigital_InfluxDb

Base module for sending data for InfluxDB.
3 stars 2 forks source link

Remove ugly string concatenation from line method(s) #31

Open mpchadwick opened 8 years ago

mpchadwick commented 8 years ago

Per https://github.com/sdinteractive/SomethingDigital_InfluxDb/pull/26#discussion_r73710624 sprintf is cleaner. Need to review all the measurements.

toddbc commented 8 years ago

Just a note - a lot of these cases are running frequently and sending a lot of lines.

Unfortunately, sprintf is not always fast. It depends, but in simple cases of concatenation of a few strings, sprintf can be 40% slower. In a tight loop with many measurements, that may add up. It depends on the volume, though.