Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance #45

Open
mr-at0s opened this issue Aug 22, 2018 · 4 comments
Open

Performance #45

mr-at0s opened this issue Aug 22, 2018 · 4 comments

Comments

@mr-at0s
Copy link

mr-at0s commented Aug 22, 2018

I added TrackerDog to our project to track entity objects and I discovered that CreateFrom consumes about 2-3 seconds on a solid developer machine (release build).

I created a small example and made some measurements. I still see similar results. Is it known than TrackerDog consumes quite a bit CPU time? Why is this? Or am I using it wrong?

Example Code:

        public class Class0
        {
            public virtual Class1 Class1 { get; set; }
        }

        public class Class1
        {
            public virtual ISet<Class2> Class2s { get; set; }
        }

        public class Class2
        {
            public int Number { get; set; }
        }

        [TestMethod]
        public void PerfTest()
        {
            var class0 = new Class0
            {
                Class1 = new Class1
                {
                    Class2s = new HashSet<Class2>
                    {
                        new Class2{Number = 1},
                        new Class2{Number = 2},
                        new Class2{Number = 3},
                        new Class2{Number = 4},
                        new Class2{Number = 5},
                        new Class2{Number = 6}
                    }
                }
            };
            var proxy = TrackableObjectFactory.CreateFrom(class0);
        }

Results:
image

image

@mfidemraizer
Copy link
Owner

May you pack this into a ZIP so I can check it on my machine?

BTW I find this very very strange, the last time I ran the tests in my own machine I got all of them green in less than 2 seconds.

My machine is an Athlon II X3@3,2GHz, 14GB RAM DDR, ... from 2010. I've seen the other guy on #44 which has opted to don't use TrackerDog because of perf issues too.

I'm surprised about these results.

Please give me the source into a ZIP attached to some comment so I can test it on my machine too and see what's going on

@mfidemraizer
Copy link
Owner

In fact, I've done a test run hosted in VSTS and I got this result for the entire test run:

2018-08-22T14:46:41.7979567Z Total tests: 45. Passed: 45. Failed: 0. Skipped: 0.
2018-08-22T14:46:41.7980626Z Test Run Successful.
2018-08-22T14:46:41.7988618Z Test execution time: 5.9453 Seconds
2018-08-22T14:46:41.8908859Z Publishing Test Results...
2018-08-22T14:46:42.8031724Z Test results remaining: 45

@mr-at0s
Copy link
Author

mr-at0s commented Aug 23, 2018

It is uploaded to https://github.com/mr-at0s/trackerdogperf

@mfidemraizer
Copy link
Owner

Ok thanks, I'll try it and I'll give you feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants