Skip to content

Commit ed93009

Browse files
CouleeAppsemesare
authored andcommitted
[SharedCache] Don't serialize state twice
1 parent f5b572b commit ed93009

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

view/sharedcache/core/DSCView.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ bool DSCView::Init()
614614
Ref<Type> filesetEntryCommandType = Type::StructureType(filesetEntryCommandStruct);
615615
DefineType(filesetEntryCommandTypeId, filesetEntryCommandName, filesetEntryCommandType);
616616

617-
if (auto metadata = SharedCacheCore::SharedCacheMetadata::LoadFromView(GetParentView()))
617+
if (auto metadata = SharedCacheCore::SharedCacheMetadata::LoadFromView(this))
618618
{
619619
BeginBulkModifySymbols();
620620
for (const auto& [imageBaseAddr, exportMap] : metadata->ExportInfos())

view/sharedcache/core/SharedCache.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3055,7 +3055,6 @@ bool SharedCache::SaveCacheInfoToDSCView(std::lock_guard<std::mutex>&)
30553055

30563056
auto data = m_cacheInfo->AsMetadata();
30573057
m_dscView->StoreMetadata(SharedCacheMetadata::Tag, data);
3058-
m_dscView->GetParentView()->StoreMetadata(SharedCacheMetadata::Tag, data);
30593058

30603059
{
30613060
std::lock_guard lock(m_viewSpecificState->cacheInfoMutex);
@@ -3092,19 +3091,16 @@ bool SharedCache::SaveModifiedStateToDSCView(std::lock_guard<std::mutex>&)
30923091
auto data = m_viewSpecificState->state.AsMetadata(m_viewSpecificState->viewState);
30933092

30943093
m_dscView->StoreMetadata(metadataKey, data);
3095-
m_dscView->GetParentView()->StoreMetadata(metadataKey, data);
30963094
modificationNumber = m_viewSpecificState->savedModifications++;
30973095
}
30983096

30993097
std::string metadataKey = SharedCacheMetadata::ModifiedStateTagPrefix + std::to_string(modificationNumber);
31003098
auto data = m_modifiedState->AsMetadata();
31013099

31023100
m_dscView->StoreMetadata(metadataKey, data);
3103-
m_dscView->GetParentView()->StoreMetadata(metadataKey, data);
31043101

31053102
Ref<Metadata> count = new Metadata(m_viewSpecificState->savedModifications);
31063103
m_dscView->StoreMetadata(SharedCacheMetadata::ModifiedStateCountTag, count);
3107-
m_dscView->GetParentView()->StoreMetadata(SharedCacheMetadata::ModifiedStateCountTag, count);
31083104

31093105
m_viewSpecificState->state.exportInfos.merge(m_modifiedState->exportInfos);
31103106
m_viewSpecificState->state.symbolInfos.merge(m_modifiedState->symbolInfos);

0 commit comments

Comments
 (0)