Hi Kim,
Thanks for the reply. What I really need is the source database table name for the entity type. Here is what I have tried:
#1) return ((RdbTableMappingInfo)EntityTypeInfo.GetByType(pEntityType).PrototypeEntityTable.TableMappingInfo).SourceTableName;
#2) return ((RdbTableMappingInfo)CobraSessionManager.Instance.CobraPersistenceManager.GetTable(pEntityType).TableMappingInfo).SourceTableName
#2 actually seems to perform just a slight bit better, but it could be because of the nature of profiling.
Our application seems to compound the issue because we are building view descriptors when it is launched. Building the view descriptors requires that we set up field lengths, which will go all the way back to our data dictionary for each entity. I have logged this happening for 64 entities, so if you could imagine 1 call to GetTable being just a bit sluggish, this will only make the issue look worse.
With that said, I have a couple of options to resolve the issue. One solution is to build the view descriptors as they are needed, which reduce the number of times GetTable is called significantly. Another solution that would require more maintenance on my end is to roll my own entity/table mapping. This is prone to error should the database schema change, so I believe I will go with option #1.