tidepool-org/tideline — pull request #174 by cheddar (2014-09-08 19:25:24+00:00)
Title: Compare speed of Joi to pure javascript

@jebeck So, 4 seconds was a little concerning to me about the validation speed. So, I did a real simple test to try to see if it really does take that long for javascript to do stuff. This PR is the code (I eliminated all of the individual data type validations and just reimplemented common).

I have Joi side by side with the simple common implementation and I believe they are equivalent.

The timing difference on 180 days of data is

![screen shot 2014-09-08 at 2 18 03 pm](https://cloud.githubusercontent.com/assets/216778/4191399/96f80e80-378d-11e4-8194-921a722a1033.png)

Which seems to indicate that Joi is 100,000x slower than pure javascript. Instead of doing a bunch of complex stuff to work around how slow Joi is, let's just not use Joi. Then again, if you notice anything stupid about what I'm doing that makes this an unfair comparison, please let me know. If the normal javascript one takes seconds as well, then there's not much we can do.