tools/source/rc/resmgr.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 489406e5ddb04a19f44b78c631aa3ad16be93a37 Author: Michael Stahl <mst...@redhat.com> Date: Wed May 3 17:08:24 2017 +0200 tools: don't use std::tie when comparing resources This is unbelievably slow, Impress is basically unusable in a non-optimized build; every time you enter or leave text edit mode, some svx::sidebar::AreaPropertyPanel is created, which loads the color palette standard.soc, and there are lots of resource lookups for the strings in there; the std::tie and std::tuple::operator< make those 10x slower. (regression from d26f7537a57e4fc4c041db852b23c27149bc213d) Change-Id: I073b0187f6c173487e781a42c49631cb9ff2e625 diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 472b3c251907..422c7882d9a1 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -412,9 +412,11 @@ struct ImpContent struct ImpContentLessCompare : public ::std::binary_function< ImpContent, ImpContent, bool> { - bool operator() (const ImpContent& lhs, const ImpContent& rhs) const + bool operator() (const ImpContent& rLhs, const ImpContent& rRhs) const { - return std::tie(lhs.nType, lhs.nId) < std::tie(rhs.nType, rhs.nId); + sal_uInt64 const lhs((static_cast<sal_uInt64>(rLhs.nType.get()) << 32) | rLhs.nId); + sal_uInt64 const rhs((static_cast<sal_uInt64>(rRhs.nType.get()) << 32) | rRhs.nId); + return lhs < rhs; } }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits