[commit] r1700 - in trunk: GME/Mga Tests/GPyUnit
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Nov 23 12:39:31 CST 2011
Author: ksmyth
Date: Wed Nov 23 12:39:31 2011
New Revision: 1700
Log:
Dont COMTRY_IN_TRANSACTION for MgaRegNode::Clear: it is a performance killer (especially in MetaGMEInterpreter, where RF registery is large and copied often). Fix bug with RegNode:get_SubNodes.
Modified:
trunk/GME/Mga/MgaAttribute.cpp
trunk/Tests/GPyUnit/test_registry.py
Modified: trunk/GME/Mga/MgaAttribute.cpp
==============================================================================
--- trunk/GME/Mga/MgaAttribute.cpp Tue Nov 22 11:41:28 2011 (r1699)
+++ trunk/GME/Mga/MgaAttribute.cpp Wed Nov 23 12:39:31 2011 (r1700)
@@ -743,7 +743,7 @@
if (wcsncmp(it->first, mypath, mypath.Length()) == 0)
{
std::wstring path = it->first;
- if (path.length() > mypath.Length())
+ if (path.length() > mypath.Length() && path[mypath.Length()] == L'/')
{
size_t end = path.find(L'/', mypath.Length() + 1);
if (end != std::wstring::npos)
@@ -820,12 +820,12 @@
STDMETHODIMP CMgaRegNode::Clear() {
- COMTRY_IN_TRANSACTION {
+ COMTRY {
fco->CheckWrite();
SetValue(mypath, NULL_SENTINEL);
markchg();
- } COMCATCH_IN_TRANSACTION(;);
+ } COMCATCH(;);
}
STDMETHODIMP CMgaRegNode::RemoveTree() {
Modified: trunk/Tests/GPyUnit/test_registry.py
==============================================================================
--- trunk/Tests/GPyUnit/test_registry.py Tue Nov 22 11:41:28 2011 (r1699)
+++ trunk/Tests/GPyUnit/test_registry.py Wed Nov 23 12:39:31 2011 (r1700)
@@ -88,6 +88,9 @@
self.assertEqual(self.project.RootFolder.GetRegistryNodeDisp('xtest123/ztest/blank').Value, '')
ATTSTATUS_HERE = 0
self.assertEqual(self.project.RootFolder.GetRegistryNodeDisp('xtest123/ztest/blank').Status(), ATTSTATUS_HERE)
+
+ self.project.RootFolder.GetRegistryNodeDisp('xtest123/zt').Value = 'xxxx'
+ self.assertEqual(self.project.RootFolder.GetRegistryNodeDisp('xtest123/zt').GetSubNodesDisp().Count, 0)
self.project.CommitTransaction()
self.project.Close(True)
More information about the gme-commit
mailing list