开发者

Why do my WP7 settings take so long to load?

开发者 https://www.devze.com 2023-03-12 01:01 出处:网络
I put a stopwatch on it. The first time the app loads (no settings file exists) it takes about 190ms to fail to load four settings. The app runs, three bools and a short string are written as settings

I put a stopwatch on it. The first time the app loads (no settings file exists) it takes about 190ms to fail to load four settings. The app runs, three bools and a short string are written as settings, and the next time the app loads, it takes 400ms to read the first setting from the IsolatedStor开发者_JS百科ageSettings.ApplicationSettings collection and about 1ms to get the remainder.

Is there anything I can do to ameliorate this load time?


Ues a better Serialization method ;) XMLSerialization is okay for more complex graphs, but for simple settings, binary serialization would be much better. Also, when you say fail to load, I assume you're doing a check to see if the files exist? If not, I think there may be exceptions being thrown internally which would slow down execution as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消