From ecb1399ca5f4917286d354b00dadb91c8075db1d Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 6 Feb 2025 11:28:07 +0100 Subject: solver3: Point to stored clauses, do not copy them This makes Work trivially destructible, and in turn solved, allowing their queues to be destructed without running destructors, and avoiding the copy should have a nice performance improvement. --- apt-pkg/solver3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/solver3.h') diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index d3e22eaba..bbe3f3d56 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -334,7 +334,7 @@ struct APT::Solver::Clause */ struct APT::Solver::Work { - Clause clause; + Clause *clause; // \brief The depth at which the item has been added depth_type depth; @@ -354,7 +354,7 @@ struct APT::Solver::Work bool operator<(APT::Solver::Work const &b) const; std::string toString(pkgCache &cache); - inline Work(Clause clause, depth_type depth) : clause(std::move(clause)), depth(depth) {} + inline Work(Clause *clause, depth_type depth) : clause(clause), depth(depth) {} }; // \brief This essentially describes the install state in RFC2119 terms. -- cgit v1.2.3-70-g09d2