Code Monkey home page Code Monkey logo

Comments (4)

xueminlee avatar xueminlee commented on May 10, 2024 1

Thanks. I try to comment synchronize and also 10 times the test case to see the result, the result is very interesting.

I also wonder if need other test case, like read, write, read, write, ...., to simulator the real world access.

from mmkv.

lingol avatar lingol commented on May 10, 2024

And what do they mean by deprecate this method? Does that mean NSUserDefaults will never lose data on App crashing? No? Well, here comes MMKV.

It's not about NSUserDefaults being slow, it's about keeping efficiency while not losing data.

from mmkv.

xueminlee avatar xueminlee commented on May 10, 2024

Please refer:https://developer.apple.com/library/archive/releasenotes/Foundation/RN-FoundationOlderNotes/index.html#X10_10Notes

see section: -[NSUserDefaults synchronize] Changes

from mmkv.

lingol avatar lingol commented on May 10, 2024

Apple declared in iOS 10 release note that

Synchronized to avoid losing data if your app crashed

is not needed anymore. I personally highly doubt that.

Well, let's trust that statement. Try this: comment the synchronize in the baseline code and run again. You can find out that NSUserDefaults is not any faster. What does that tell you?

from mmkv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.