From 9bc8e839c7f3ba6e34c3e5f45e0bfae3a2c753b2 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 11 Oct 2024 09:27:42 -0700 Subject: [PATCH] Reorder fields in query map result to help reduce memory footprint Signed-off-by: Danila Fedorin --- frontend/include/chpl/framework/Context-detail.h | 4 ++-- frontend/lib/framework/Context.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/include/chpl/framework/Context-detail.h b/frontend/include/chpl/framework/Context-detail.h index 877230a56731..d6816482b4a2 100644 --- a/frontend/include/chpl/framework/Context-detail.h +++ b/frontend/include/chpl/framework/Context-detail.h @@ -275,8 +275,6 @@ class QueryMapResultBase { // extra boolean is fine. mutable bool beingTestedForReuse = false; - mutable QueryDependencyVec dependencies; - // Whether or not errors from this query result have been shown to the // user (they may not have been if some query checked for errors). mutable bool emittedErrors = false; @@ -287,6 +285,8 @@ class QueryMapResultBase { // This is not too strongly connected to emittedErrors (which tracks whether // errors --- if any --- were shown to the user for this query result only) mutable bool errorsPresentInSelfOrDependencies = false; + + mutable QueryDependencyVec dependencies; mutable std::set recursionErrors; mutable QueryErrorVec errors; diff --git a/frontend/lib/framework/Context.cpp b/frontend/lib/framework/Context.cpp index a79141b8b7fb..50a15dd61412 100644 --- a/frontend/lib/framework/Context.cpp +++ b/frontend/lib/framework/Context.cpp @@ -1351,9 +1351,9 @@ QueryMapResultBase::QueryMapResultBase(RevisionNumber lastChecked, : lastChecked(lastChecked), lastChanged(lastChanged), beingTestedForReuse(beingTestedForReuse), - dependencies(), emittedErrors(emittedErrors), errorsPresentInSelfOrDependencies(errorsPresentInSelfOrDependencies), + dependencies(), recursionErrors(std::move(recursionErrors)), errors(), parentQueryMap(parentQueryMap) {