Skip to content

Conversation

nlutsenko
Copy link
Contributor

This improves creation of string from dates by ~5 times, by using sqlite directly instead of generic NSDateFormatter.
As a result of this improvement:

  • 5-10% win in LDS performance on pinning (I am serious, there is a huge ton of time spent here)
  • huge performance gain on encoding any JSON that has our dates in it, say for any network request

Contributes to #32, as it improves LDS perf.

Now, onto notes - I intentionally am not resetting the binding on the statements,
as there is slight performance gain there (about 5% compared to resetting them every time).
Couldn't come up with implications on not doing this, as I feel it's safe to do it in this use-case.

@richardjrossiii
Copy link
Contributor

Resetting is safe to not do because we're only binding primitives (aka double here). Those will be directly copied into the statement's internal buffer. Love it!

nlutsenko added a commit that referenced this pull request Nov 23, 2015
Improve performance of string from date creation.
@nlutsenko nlutsenko merged commit 39ab7b8 into master Nov 23, 2015
@nlutsenko nlutsenko deleted the nlutsenko.dateFormatter branch November 23, 2015 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants