Hi Fabio,

Thanks for the reply. As I've said, its a very simple entity with just
an id and description. I'm converting it to a DTO object with the same
properties. So there are no relations to any other object. Below is a
sample entity and its map file that i'm trying it on.

Thanks and Regards,
Aldrich

//Entity
Public class MyEntity
{
public Guid Id {get;set;}
public string Description {get;set;}
}


//Map File
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
  namespace="Test.Domain"
  assembly="Test"  >
<class name="MyEntity">
  <id name="Id">
    <generator class="guid" />
  </id>
  <property name="Description" />
</class>
</hibernate-mapping>

Regards,
Aldrich


On Apr 24, 10:22 pm, John Davidson <[email protected]> wrote:



On Apr 24, 5:35 pm, Fabio Maulo <[email protected]> wrote:
> What I mean, "aldrich12", is that there are a lot of reasons and you gave us
> only a little pixel of a big picture.
> One of possible reason:
> during the DTO transformation you are initializing lot of relations,
> collections and so on, running thousands of queries.
>
>
>
>
>
> On Sun, Apr 24, 2011 at 10:29 AM, Fabio Maulo <[email protected]> wrote:
> > I'm doing this: query.List<MyEntity>().
> > I don't know why it take so long time.
> > Can you help me ?
>
> > On Sun, Apr 24, 2011 at 5:59 AM, aldrich12 <[email protected]> wrote:
>
> >> I have a very simple entity with just an id and a description.
> >> When i try to do a criteria.List<MyEntity>() and then loop through
> >> that list to transform it to a DTO object, it takes a considerably
> >> long time compared to entity framework or using a datareader. Looping
> >> through the Nhibernate list takes about 8 seconds for just 2000+
> >> records unlike for entity framework its instantaneous.
>
> >> I've tried settings flushmode to never, clearing out the session but
> >> it doesn't affect the performance. Can anybody here shed some light as
> >> to why this is happening?
>
> >> --
> >> 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.
>
> > --
> > Fabio Maulo
>
> --
> Fabio Maulo- Hide quoted text -
>
> - Show quoted text -

-- 
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