I experience a very strange behaviour of my application. We are working with xml based data which is persisted as xml into files. For unknown reasons the deserialization suddenly is very slow and I tried to figure out what the problem is.
I had a look at the performance of a file which is has 6MB of size. I logged the deserialization time from the point where the deserialization starts:
Both using the same .net framework version. I do not understand why it performs that slow. I also did a trace and discovered that the issue is really the .net code:
I can reproduce this very reliably over and over again.
What am I missing?
I have found the issue:
There is some code called within the property setter of the classes which is only executed when the system is initialized correctly.