c# - JSON serialization performance issue on WP7 -


i have .json file approx. 1.5mb in size containing around 1500 json objects want convert domain objects @ start-up of app.

currently process on phone (not on development pc) takes around 23 seconds far slow me , forcing me write list of objects applicationsettings dont have each time app loads (just first off), takes 15-odd seconds write to, , 16 seconds read from, of not enough.

i have not had lot of serialization experience , dont know fastest way done.

currently, using system.runtime.serialization namespace datacontract , datamember approach.

any ideas on performance type of data loading?

i found json.net library more performant , have better options standard json serializer.

one performance issue encountered in app domain objects implemented inotifypropertychanged code support dispatching event ui thread. since deserialization code populated properties doing lot of thread marshalling didn't need there. cutting out notifications during deserialization substantially increased performance.

update: using caliburn micro has property on propertychangedbase can turn off property changed notifications. added following:

[ondeserializing] public void ondeserializing(streamingcontext context) {     isnotifying = false; }  [ondeserialized] public void ondeserialized(streamingcontext context) {     isnotifying = true; } 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -