Automapping startup delays - how does this scale?

tbushell's Avatar

tbushell

16 Mar, 2010 09:27 PM via web

We've got Automapping working on our first project. Currently, we're mapping 7 classes, which collectively have fewer than 200 members.

There is a small, but noticeable, delay when FNH is initialized - about 5 - 8 seconds on our dev desktops - 2.7 meg dual core CPUs with 3.25 meg ram.

This is not a problem now, but we expect our database to expand by at least a factor of three, and are wondering how much this will impact startup time for our application.

Is anyone automapping 20 - 30 classes, or more? What kind of startup times are you experiencing?

Thanks,

-Tom

  1. Support Staff 2 Posted by James Gregory on 16 Mar, 2010 09:29 PM

    James Gregory's Avatar

    Have you profiled your app? NHibernate itself has an inherent delay when
    creating the session factory.

  2. 3 Posted by tbushell on 16 Mar, 2010 09:45 PM

    tbushell's Avatar

    No, not yet. We're using VS2008 professional edition, which does not have a profiler, (as far as I can determine, anyway).

    I could add some timing logic to my code, of course, but thought I'd ask what other users are experiencing first.

    Anyone ever measured how long it takes to create the session factory alone?

    -Tom

  3. Support Staff 4 Posted by Paul Batum on 17 Mar, 2010 08:37 AM

    Paul Batum's Avatar

    The time taken to build a session factory will depend a great deal on how many entities are being mapped.

    I've never compared the automapper performance to the session-factory-building performance as it hasn't been an issue for me yet. The automapper is doing alot of reflection so if you have a big domain, it wouldn't surprise me if both steps were taking a significant chunk of time.

    So the short answer, as with all performance issues, is to profile it :)

  4. 5 Posted by tbushell on 17 Mar, 2010 02:40 PM

    tbushell's Avatar

    Any recommendations on profiling tools?

  5. Support Staff 6 Posted by James Gregory on 17 Mar, 2010 02:46 PM

    James Gregory's Avatar

    JetBrains dotTrace has always served me well; it has a 10 day trial, which I believe is fully featured.

  6. 7 Posted by tbushell on 17 Mar, 2010 02:49 PM

    tbushell's Avatar

    James, thanks for the suggestion. I love JetBrain's ReSharper, so I will definitely check out dotTrace.

    -Tom

Comments are currently closed for this discussion. You can start a new one.