Performance issues

Apr 29, 2014 at 7:23 AM
Edited Apr 29, 2014 at 7:23 AM
Hi again!

I managed implementing with the keys defined in the configuration file and it works great...

Except for the performance... The objects I compare are rather large(they contain many properties, lists and dictionaries with other complex objects and about 1000-2000 elements each) and it took almost 2h for generating the Snapshot just for one of them...

Am I doing something wrong maybe or is reflection so time consuming over objects so large?
Coordinator
Apr 29, 2014 at 6:58 PM
re-Hi,

ok. I also changed the algo so that it is possible to use the "IDictionary" type in the config file (release will come).

But, WOW! Thats amazing - 2 hours. I think you're right, that reflection is the time consuming element (I didn't made performance tests till now).
I see two starting points for that issue:
1) Try to parallelize some loops
2) Creating proxy types at runtime

First, I'll try the first option, so that all cpu cores can be used.

Are you loading a database into memory?
Is it possible to give me an example class or additional info (number of properties, hierarchy depth, ...)
Apr 29, 2014 at 7:27 PM
Edited Apr 29, 2014 at 7:48 PM
No, the objects are used directly from memory.

I'm not sure how I could provide you more details except send you the library and the serialized objects.
If you provide me with an e-mail address, I could send these files to you.

But just to get a picture, I had to create a separate project for loading the assembly and generating the config file. In total, there are about 1000 different Member tags in the file, many of which are lists or dictionaries containing complex objects.

I'm not sure about the depth but I'd bet it's pretty large too...

Also, what do you mean by creating proxy types at runtime?
Coordinator
Apr 30, 2014 at 8:35 AM
Ok, gladly you can send me the library to my email address: iii(at)gmx.at (yes the email address is correct :)

Regarding point two of my suggestion (ProxyType): I think that's not a good way, because interfaces are needed. Maybe, creating Compare-Classes at runtime and compiling them would be an option. But that needs some development time from my side.

Thanks,
alex
Coordinator
May 5, 2014 at 6:17 AM
Ok.
To close this thread I summarize:
Do not use the DEBUG-Version (not compiled with cofiguration Release), because there is extensive logging enabled.
Marked as answer by testy on 5/12/2014 at 12:26 AM