0

will it affect the performance if i store about 1.5mb worth 100+ string_array data inside strings.xml?

Any other best method to store them?

1 Answer 1

2

I don't think there would be any noticeable performance problems with 1.5MB string.xml, except that your app would take up a little more RAM for the time it runs. It's fine, as long as it doesn't grow beyond, say 2-3 MBs, which might leave less RAM for other portions of your app.

Android will throttle the RAM anyway, so, if during your testing, you don't see any OutOfMemory errors, you are good to go.

But then, there might be other approaches, depending on what exactly your requirement is.

Sign up to request clarification or add additional context in comments.

3 Comments

Well my apps will work something like user select a word from listview and then will tap on it, it will display huge information which this string_array is stored.
Is it better than using strings.xml?
Yes, if your data is huge. string.xml is a place where you specify the texts/labels etc that your app would use. It's not a place where you should store any data as such.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.