Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Phenoxon · Jun 06, 2015 at 06:18 PM · androidiosunity5playerprefsserialization

Is PlayerPrefs still slow?

This article from 2011 suggests that PlayerPrefs is "really slow on iOS and even slower on Android". Is this still true in 2015 and Unity 5?

The post goes on to say:

Most likely, they are doing file I/O operations for every modification. The current PlayerPrefs class is clearly not designed to handle a larger amount of data.

Is it also still recommended that content be stored in serialized form?

Thanks.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Crystalline · Jun 06, 2015 at 07:04 PM 1
Share

I have used Player Prefs on Android back in 4x versions. .and it worked pretty fast.. Haven't seen any problems. Pretty sure unity 5 didnt changed much regarding this though.

avatar image TriBolt72 · Jun 06, 2015 at 09:53 PM 1
Share

works well for me too

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by SarperS · Jun 07, 2015 at 05:44 AM

PlayerPrefs actually does not do any file I/O operations unless you call PlayerPrefs.Save, so it holds the values in memory until the player quits the game, by default it saves the data on disk in OnApplicationQuit implicitly.

Also the benchmark they did is not realistic. In a real world example, if you are saving 6/7 values per second, there is something really wrong with your approach to whatever you are trying to solve.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Myzer · Jun 07, 2015 at 04:13 PM

I am by no means an expert on this, but, I can say that whenever I use it, it works perfectly fine for me. I have never noticed any sort of performance issues whatsoever with it. With that said, I should also state that, thus far, I've only had to use it for storing small amounts of data that I then use to determine simple things. For example: If, in my game the player decided to mute or lower the volume, I'd just write that value the user sets to PlayerPrefs and check it whenever it needs to be checked. So, I haven't used it for anything extravagant enough to say, but it should be fine.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Voxel-Busters · Jun 07, 2015 at 12:05 PM

PlayerPrefs works well, we dint notice any lags because of it, then again it depends on the data being serialised. FYI, Unity writes preferences to disk only when application is about quit. Check this link for more info http://docs.unity3d.com/ScriptReference/PlayerPrefs.Save.html

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

does unity 5.3 change player prefs path or file extension on android ? 1 Answer

PlayerPrefs to store a huge binary on mobile iOS Android 1 Answer

why unity IPA file size increased after installation as compare to unity APK? 1 Answer

Save downloaded content when App is updated 0 Answers

Issue saving data accross multiple platforms 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges