Not to say that your experience (or code) couldn't be better than mine, but
I found in writing my own O/R mapper for .NET that reflection seemed fast
enough when benchmarking a single thread, but when testing against a
concurrent system, it became very slow.  I switched instead to defining a
persistent base class that stores its state in a hashtable.  Invasive, yes,
but much, much faster.  It also allows for some more flexibility in what
data gets loaded into an object.

John

-----Original Message-----
From: Murphy, James [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 8:25 AM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] OT: Relational to Object mapping.

> 3.  Fast and scalable
>
> *** I object - NOT with reflection.

Oh - sure play the "Reflection is slow" card.  You take a hit the first time
the metadata is accessed but afterwards I've found its very adequate.  Given
the usage patter than a typical application will save and load a very finite
set of class types the reflection performance problem isn't one.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to