[mapguide-commits] r7540 - in trunk/MgDev/Desktop: MgDesktop/Services UnitTest
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed May 29 18:55:23 PDT 2013
Author: jng
Date: 2013-05-29 18:55:22 -0700 (Wed, 29 May 2013)
New Revision: 7540
Modified:
trunk/MgDev/Desktop/MgDesktop/Services/ResourceService.cpp
trunk/MgDev/Desktop/UnitTest/TestResourceService.cpp
Log:
#2279: Merge r7531 to trunk
Modified: trunk/MgDev/Desktop/MgDesktop/Services/ResourceService.cpp
===================================================================
--- trunk/MgDev/Desktop/MgDesktop/Services/ResourceService.cpp 2013-05-29 20:49:00 UTC (rev 7539)
+++ trunk/MgDev/Desktop/MgDesktop/Services/ResourceService.cpp 2013-05-30 01:55:22 UTC (rev 7540)
@@ -451,10 +451,6 @@
{
ReleasePotentialLocks(resource);
- //Empty cached version
- MgdResourceContentCache* cache = MgdResourceContentCache::GetInstance();
- cache->RemoveContentEntry(resource);
-
STRING contentPath = ResolveContentPath(resource);
STRING dataPath = ResolveDataPath(resource);
if (MgFileUtil::IsFile(contentPath))
@@ -494,6 +490,10 @@
void MgdResourceService::ReleasePotentialLocks(MgResourceIdentifier* resource)
{
+ //Empty cached version
+ MgdResourceContentCache* cache = MgdResourceContentCache::GetInstance();
+ cache->RemoveContentEntry(resource);
+
CHECKARGUMENTNULL(resource, L"MgdResourceService::DeleteResource");
if (resource->GetResourceType() == MgResourceType::FeatureSource)
{
Modified: trunk/MgDev/Desktop/UnitTest/TestResourceService.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestResourceService.cpp 2013-05-29 20:49:00 UTC (rev 7539)
+++ trunk/MgDev/Desktop/UnitTest/TestResourceService.cpp 2013-05-30 01:55:22 UTC (rev 7540)
@@ -1153,11 +1153,11 @@
Ptr<MgByteReader> content = pService->GetResourceContent(resId);
}
ACE_DEBUG((LM_INFO, ACE_TEXT(" Execution Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0) ));
-
- //Evict all cached copies to avoid distortion of results due to caching
- cache->Clear();
ACE_DEBUG((LM_INFO, ACE_TEXT(" %d resource content items in cache\n"), (cache->GetCacheSize()) ));
+ //Evict all cached copies to avoid distortion of results due to caching
+ cache->Clear();
+
lStart = GetTickCount();
Ptr<MgStringCollection> contents;
ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestResourceService::TestCase_BenchmarkGetResourceContents() - Multi-threaded GetResourceContents call (cold) \n")));
More information about the mapguide-commits
mailing list