Max number of keys on a user statistic?
-
I'm planning on making a word game and I want to track all the words that a user may play in their lifetime. I was planning on making a user statistic key for each word as the key, and the number of times they played the word as a numeric value.
In theory, a user may have over 2000 of these keys. Is there a max number of keys that can exist on a user statistic?
-
Update - we discussed it and we think you are good to go.
A test of 1000 stats revealed that the resulting statistics object (that contains all values) was only about 64KB - which is smaller than I had feared. So it looks like 2000-2500 stats will come in less than 200KB.
Note - that IS 200KB more data that will be returned during an Authenticate call - and during readUserState() - but it should work okay.
I assume you'll be creating these stats dynamically. That is controlled via the setting on this page (you've probably already discovered it).
One warning is that stats are case sensitive - so we'd definitely recommend that you standardize the creation/accessing of the stats - maybe do an uppercase() or lowercase() cast before creating / accessing them.
I hope that helps. Good luck!
Paul.
-
Hmm - I don't think there's a hard limit - but that said - I'm not sure > 2000 stats would be recommended either.
I know of apps in production with hundreds of keys - but I am not aware of any in the thousands.
Let me check with the devs...
-
Update - we discussed it and we think you are good to go.
A test of 1000 stats revealed that the resulting statistics object (that contains all values) was only about 64KB - which is smaller than I had feared. So it looks like 2000-2500 stats will come in less than 200KB.
Note - that IS 200KB more data that will be returned during an Authenticate call - and during readUserState() - but it should work okay.
I assume you'll be creating these stats dynamically. That is controlled via the setting on this page (you've probably already discovered it).
One warning is that stats are case sensitive - so we'd definitely recommend that you standardize the creation/accessing of the stats - maybe do an uppercase() or lowercase() cast before creating / accessing them.
I hope that helps. Good luck!
Paul.
-