sunshinejr / SwiftyUserDefaults

Modern Swift API for NSUserDefaults
http://radex.io/swift/nsuserdefaults/static
MIT License
4.86k stars 366 forks source link

Time Performance issue #139

Closed ghost closed 5 years ago

ghost commented 7 years ago

After adding part of code massively using SwiftyUserDefaults there is a huge decline of time performances on my iOS app.

Using Instruments I noticed decodeObjectBinary and decodeInt64 are the two main responsibles for these poor performances. For the second one, decodeInt64 , I don't know what to do to improve performances as it is part Foundation. But for decodeObjectBinary there is space for improvement on my own coder methods on arrays and dictionaries.

But this is really strange as even if the data structure to save is a bit complicated, this is not huge work to do for our modern processor. So here is my question: are there any performance issues related to SwiftyUserDefaults?