Hi,

Unhappily I dont think I can help you since I dont use an IoC container.
What I can say is that I use a simple generic DAO for all entity types and
very few specific entity DAOs and due to that I have a small startup.

public interface ICommonDAO <--- CommonDAO is a generic DAO for all entities
{
    void Save(object entity);
    void Remove(object entity);
    IQueryable<T> Query<T>();
    ISomeDAO Get<ISomeDAO>(); <-- Gets specific DAOs like the one below
}

public interface IOrderDAO  <--- Specific DAO: you will rarely need this
{
    void ProcessAllActive(); <--- Exists because I need to access a stored
procedure for efficient batch processing
}

However if you have the One-DAO-per-Entity programming model (I dont know if
it is your case) the app startup would take longer.


On Wed, Feb 24, 2010 at 9:50 AM, Reggie Pangilinan <
[email protected]> wrote:

> Thank you all for your suggestions.. Sure im gonna check all of that.
>
> @Humberto Marchezi
> *Well its not just Nhibernate i am loading at startup.. Im using an IoC
> container and registering all of my dao,services,views,presenters etc. That
> is why i am looking for a way to load all of that in a seperate thread. Do
> you have a better suggestion/idea to do this? *
> *
> *
> *
> *
> On Wed, Feb 24, 2010 at 4:28 AM, Humberto Marchezi 
> <[email protected]>wrote:
>
>> Hi Reggieboy,
>>
>> Are you sure it is NHibernate who is slowing your app down ?
>> You need a very large number of entities in order to feel it.
>> Just to give you an idea I have a Winform application with almost 1000
>> entities but no sensitive slow down in the initialization or any other part.
>>
>>
>>
>> On Tue, Feb 23, 2010 at 1:13 PM, Diego Mijelshon 
>> <[email protected]>wrote:
>>
>>> It really depends on what other initialization you app has do perform.
>>> There's no problem with using a separate thread using the threadpool, new
>>> Thread(), Tasks, etc, as long as you join/wait/whatever to make sure it's
>>> finished before you start using it.
>>>
>>> Also, there's an example of configuration serializing to speed up load
>>> times in Effectus, have a look at
>>> http://github.com/ayende/Effectus/blob/master/Effectus/Infrastructure/BootStrapper.cs
>>>
>>>    Diego
>>>
>>>
>>>
>>> On Tue, Feb 23, 2010 at 12:46, reggieboy <[email protected]>wrote:
>>>
>>>> Hello guys, im working on winforms project using nhibernate
>>>> (obviously). Im having a problem during the startup of the application
>>>> its taking a little while to load the application. I think this is due
>>>> building the session factory, mappings and etc. I have a lot of
>>>> entity, that might have been the main problem. So im thinking of
>>>> configuring nhibernate asynchronously... Do any of you guys know what
>>>> is the best way to do this? Thank you
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nhusers" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<nhusers%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nhusers?hl=en.
>>>>
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "nhusers" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<nhusers%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/nhusers?hl=en.
>>>
>>
>>
>>
>> --
>> Humberto C Marchezi
>> ---------------------------------------------------------
>> Master in Electrical Engineering - Automation
>> Software Consultant and Developer
>> at the Town Hall of Vitória
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<nhusers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>



-- 
Humberto C Marchezi
---------------------------------------------------------
Master in Electrical Engineering - Automation
Software Consultant and Developer
at the Town Hall of Vitória

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to