BUG#: 7845
authorthilo.boehm <thilo.boehm>
Wed, 20 Aug 2008 15:09:03 +0000 (15:09 +0000)
committerthilo.boehm <thilo.boehm>
Wed, 20 Aug 2008 15:09:03 +0000 (15:09 +0000)
TITLE: New repository implementaion constrains performance at Association.

DESCRIPTION: Remove loops through Strings.

src/Pegasus/Repository/FileBasedStore.cpp

index 2ca0c1df185e1740415b4f73ee20574df8864cc4..2770dacccf9080c359407c46f0a249d5f213561d 100644 (file)
@@ -1842,18 +1842,15 @@ void FileBasedStore::getClassAssociatorNames(
 
     String assocFileName = _getAssocClassPath(nameSpace);
 
-    for (int i = 0, m = assocFileName.size(); i < m; i++)
-    {
-        // ATTN: Return value is ignored
-        AssocClassTable::getAssociatorNames(
-            assocFileName,
-            classList,
-            assocClassList,
-            resultClassList,
-            role,
-            resultRole,
-            associatorNames);
-    }
+    // ATTN: Return value is ignored
+    AssocClassTable::getAssociatorNames(
+        assocFileName,
+        classList,
+        assocClassList,
+        resultClassList,
+        role,
+        resultRole,
+        associatorNames);
 
     PEG_METHOD_EXIT();
 }
@@ -1869,19 +1866,13 @@ void FileBasedStore::getClassReferenceNames(
 
     String assocFileName = _getAssocClassPath(nameSpace);
 
-    Boolean refs = false;
-    for (int i = 0, m = assocFileName.size(); !refs && i < m; i++)
-    {
-        if (AssocClassTable::getReferenceNames(
-            assocFileName,
-            classList,
-            resultClassList,
-            role,
-            referenceNames))
-        {
-            refs = true;
-        }
-    }
+    // ATTN: Return value is ignored
+    AssocClassTable::getReferenceNames(
+         assocFileName,
+         classList,
+         resultClassList,
+         role,
+         referenceNames);
 
     PEG_METHOD_EXIT();
 }