Page 1 of 1

Deeply nested schema hierarchy = performance hit?

Posted: Fri Aug 07, 2009 11:20 am
by ConvertFromOldNGs
by Eric Peachey >> Mon, 15 May 2000 23:37:29 GMT

Hello,

Somebody's been asking if having a deeply nested schema hierarchy (say 10 levels) would affect performance of applications. I'm assuming that the answer is no - the JOM doesn't care about what schema an object is in (presumably applies when accessing subschema objects too).

I know it can be a pain during development hopping between schemas at present. Just wondering if there's any overhead at run time.

Ta,

Eric in Dunedin (lovely late autumn day down here)

Re: Deeply nested schema hierarchy = performance hit?

Posted: Fri Aug 07, 2009 11:20 am
by ConvertFromOldNGs
by Dean Cooper >> Tue, 16 May 2000 6:35:32 GMT
Somebody's been asking if having a deeply nested schema hierarchy (say 10 levels) would affect performance of applications. I'm assuming that the answer is no - the JOM doesn't care about what schema an
object is in (presumably applies when accessing subschema
objects too).

In theory, compared to an app implemented in a single schema, an app implemented across multiple schemas may start up a little slower (because there are more schemas to open when the process signs on), and may take slightly longer to open some classes (if they're several schemas above the schema from which the app is running). There will be slightly more memory consumed by the kernel (JOM) because there are more internal schema structures open.

In reality, none of the above should have a significant (often not even measurable) impact on runtime performance. If your most pressing runtime performance issue happens to be the affect of multiple schemas, I'd say your system is in great shape! :-)

Once an app is up and running though, from the kernel's point of view there shouldn't be any impact having it implemented across multiple schemas. You're correct, Eric: Once a class is open, the kernel doesn't really care what schema it's defined in when accessing instances of that class. And keep in mind that when you have multiple processes (apps) running in the same node (eg: an app server), they all share the same kernel structures; so once one process has opened schemas and classes, they're open for all processes in that node.

I've heard recently as well of a few of cases where people have been told that multiple schemas are bad for runtime performance. This may have come from a couple of problems we had in JADE 4 (mainly to do with getting the value of translatable strings), where the performance of the operations degraded as schema levels were added. This was a problem only with the implementation of those specific operations (which have been fixed), not with multiple schemas in general. Another case in which you may notice a difference is if you have code that uses the meta-model to access schemas, classes, etc. Obviously, if you run this code in a database where there are more meta-objects (eg: Schema objects, Class objects, etc), it may take longer. But again, this isn't a flaw with multiple schemas.
I know it can be a pain during development hopping between schemas at present. Just wondering if there's any overhead
at run time.

In 5.1 you can have browsers open for multiple schemas at the same time.

Dean.