In desktop apps i use to do the config during splash screen in a separate
thread, in general i have 4/5 seconds until the user which just did double
click ends writing his username and password, so i'm always faster than
that...

Gustavo.

On Wed, Mar 31, 2010 at 1:27 PM, Visar Uruqi <visar.ur...@gmail.com> wrote:

> I tried the serialization and deserialization
> and WOW it has shorten the startup a lot,
> By the way I'm developing a desktop application
> that's why the startup thing matters to me.
>
> How do you guys measure the duration of these operations
> in seconds and miliseconds, I'm curios to know,
> do you use any open source tools? or you just get the time
> before the method call and after and calculate the difference.
>
> Anyway thank you for your fast replies, I hope this is discussion
> is going to be useful for somebody else like me.
>
> visar
>
> On Mar 30, 10:33 pm, Fabio Maulo <fabioma...@gmail.com> wrote:
> > Deserialization is faster
> >
> > FNH : 04.360
> > ConfORM : 00.958 (with hibernate.cfg.xml)
> > Deserialization: 00.283
> >
> > Time in second measured to have a full configured configuration ready to
> > BuildSessionFactory
> >
> > 2010/3/30 Ajai Shankar <ajai.shan...@gmail.com>
> >
> >
> >
> >
> >
> > > Out of curiosity, in the grand scheme of things what difference does
> > > shaving maybe a couple of seconds? on startup make...
> >
> > > Ajai
> >
> > > On Tue, Mar 30, 2010 at 3:11 PM, Fabio Maulo <fabioma...@gmail.com>
> wrote:
> >
> > >> we are going to check how much faster is the
> configuration-deserialization
> > >> over add-Xml-Deserialized
> >
> > >> 2010/3/30 Ricardo Peres <rjpe...@gmail.com>
> >
> > >>> Visar,
> >
> > >>> In order to fasten startup time, you can serialize the Configuration
> > >>> object:
> >
> > >>> Configuration cfg = new Configuration().Configure();
> > >>> IFormatter serializer = new BinaryFormatter();
> >
> > >>> using (Stream stream = File.OpenWrite("Configuration.serialized"))
> > >>> {
> > >>>    serializer.Serialize(stream, configuration);
> > >>> }
> >
> > >>> ...
> >
> > >>> using (Stream stream = File.OpenRead("Configuration.serialized"))
> > >>> {
> > >>>    cfg = serializer.Deserialize(stream) as Configuration;
> > >>> }
> >
> > >>> RP
> >
> > >>> On Mar 30, 7:04 pm, Fabio Maulo <fabioma...@gmail.com> wrote:
> > >>> > The life cycle of the mapping is explained herehttp://
> > >>> fabiomaulo.blogspot.com/2010/03/nhibernate-mappings-path.html
> >
> > >>> > 2010/3/30 Fabio Maulo <fabioma...@gmail.com>
> >
> > >>> > > The third...
> > >>> > > After BuildSessionFatory all mapping-metadata are compiled to
> > >>> persisters
> > >>> > > and you can throw the Configuration with its state.
> >
> > >>> > > 2010/3/30 Diego Mijelshon <di...@mijelshon.com.ar>
> >
> > >>> > > Fabio answered he first part, so I'll answer the second one:
> >
> > >>> > >> "Is the impact on performance only in startup? Or is it olso
> during
> > >>> CRUD
> > >>> > >> operations?"
> >
> > >>> > >> Once the SessionFactory has been created, it doesn't matter how
> you
> > >>> > >> configured it.
> >
> > >>> > >>    Diego
> >
> > >>> > >> On Tue, Mar 30, 2010 at 10:36, Visar Uruqi <
> visar.ur...@gmail.com>
> > >>> wrote:
> >
> > >>> > >>> Is it true that if I specify details in the mapping xml file
> > >>> > >>> like for example the data-type of the property the length and
> othe
> > >>> > >>> constraints,
> > >>> > >>> would result in a faster startup and better performance?
> >
> > >>> > >>> (I came to this idea when I enabled the log4net Logging
> library,
> > >>> and
> > >>> > >>> got
> > >>> > >>> a bunch of mapping and reflection statements in the
> logfile.txt, I
> > >>> > >>> think Nhibernate was trying
> > >>> > >>> to figure out what kind of data-type I am using in my POCO
> > >>> classes...
> > >>> > >>> and therefore
> > >>> > >>> consuming time and energy.
> >
> > >>> > >>> Let me show what I mean:
> >
> > >>> > >>> For example this is a mapping without specifying any details,
> just
> > >>> the
> > >>> > >>> property names
> > >>> > >>> <class name="Artikulli" table="Artikulli">
> > >>> > >>>                <id name="ID">
> > >>> > >>>                        <generator class="native" />
> > >>> > >>>                </id>
> > >>> > >>>                <property name="Emri"/>
> > >>> > >>>                <property name="Pershkrimi"/>
> > >>> > >>>                <property name="Data"/>
> > >>> > >>>        </class>
> >
> > >>> > >>> And this is a mapping with data-type, length etc.
> > >>> > >>> <class name="Article" table="Article">
> > >>> > >>>                <id name="ID" column="ID">
> > >>> > >>>                        <generator class="native" />
> > >>> > >>>                </id>
> > >>> > >>>                <property name="Name" type="String"
> length="50"/>
> > >>> > >>>                <property name="Desc" type="String"
> length="50"/>
> > >>> > >>>                <property name="Date" type="DateTime"/>
> > >>> > >>>        </class>
> >
> > >>> > >>> The question is "Is this configuration going to be faster?"
> > >>> Consider
> > >>> > >>> when you have 20 or more entities
> > >>> > >>> Is the impact on performance only in startup? Or is it olso
> during
> > >>> > >>> CRUD operations?
> >
> > >>> > >>> Visar
> >
> > >>> > >>> --
> > >>> > >>> You received this message because you are subscribed to the
> Google
> > >>> Groups
> > >>> > >>> "nhusers" group.
> > >>> > >>> To post to this group, send email to nhus...@googlegroups.com.
> > >>> > >>> To unsubscribe from this group, send email to
> > >>> > >>> nhusers+unsubscr...@googlegroups.com<nhusers%2bunsubscr...@googlegroups.com>
> <nhusers%2bunsubscr...@googlegroups.com<nhusers%252bunsubscr...@googlegroups.com>>
> > >>> <nhusers%2bunsubscr...@googlegroups.com<nhusers%252bunsubscr...@googlegroups.com>
> <nhusers%252bunsubscr...@googlegroup s.com>>
> > >>> > >>> .
> > >>> > >>> 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 nhus...@googlegroups.com.
> > >>> > >> To unsubscribe from this group, send email to
> > >>> > >> nhusers+unsubscr...@googlegroups.com<nhusers%2bunsubscr...@googlegroups.com>
> <nhusers%2bunsubscr...@googlegroups.com<nhusers%252bunsubscr...@googlegroups.com>>
> > >>> <nhusers%2bunsubscr...@googlegroups.com<nhusers%252bunsubscr...@googlegroups.com>
> <nhusers%252bunsubscr...@googlegroup s.com>>
> > >>> > >> .
> > >>> > >> For more options, visit this group at
> > >>> > >>http://groups.google.com/group/nhusers?hl=en.
> >
> > >>> > > --
> > >>> > > Fabio Maulo
> >
> > >>> > --
> > >>> > Fabio Maulo
> >
> > >>> --
> > >>> You received this message because you are subscribed to the Google
> Groups
> > >>> "nhusers" group.
> > >>> To post to this group, send email to nhus...@googlegroups.com.
> > >>> To unsubscribe from this group, send email to
> > >>> nhusers+unsubscr...@googlegroups.com<nhusers%2bunsubscr...@googlegroups.com>
> <nhusers%2bunsubscr...@googlegroups.com<nhusers%252bunsubscr...@googlegroups.com>>
> > >>> .
> > >>> For more options, visit this group at
> > >>>http://groups.google.com/group/nhusers?hl=en.
> >
> > >> --
> > >> Fabio Maulo
> >
> > >>  --
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "nhusers" group.
> > >> To post to this group, send email to nhus...@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >> nhusers+unsubscr...@googlegroups.com<nhusers%2bunsubscr...@googlegroups.com>
> <nhusers%2bunsubscr...@googlegroups.com<nhusers%252bunsubscr...@googlegroups.com>>
> > >> .
> > >> 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 nhus...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > nhusers+unsubscr...@googlegroups.com<nhusers%2bunsubscr...@googlegroups.com>
> <nhusers%2bunsubscr...@googlegroups.com<nhusers%252bunsubscr...@googlegroups.com>>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/nhusers?hl=en.
> >
> > --
> > Fabio Maulo
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to nhus...@googlegroups.com.
> To unsubscribe from this group, send email to
> nhusers+unsubscr...@googlegroups.com<nhusers%2bunsubscr...@googlegroups.com>
> .
> 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 nhus...@googlegroups.com.
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to