Merge pull request #4898 from khaneliman/memory

perf(memory): optimize string operations; remove deep copies, memdup, and icon theme rescanning
This commit is contained in:
Alexis Rouillard
2026-03-04 22:40:55 +01:00
committed by GitHub
33 changed files with 75 additions and 69 deletions

View File

@@ -3,10 +3,10 @@
#include <glibmm/dispatcher.h>
#include <sigc++/signal.h>
#include <cstddef>
#include <functional>
#include <mutex>
#include <queue>
#include <cstddef>
#include <thread>
#include <tuple>
#include <type_traits>

View File

@@ -72,8 +72,7 @@ class SleeperThread {
std::unique_lock lk(mutex_);
CancellationGuard cancel_lock;
return condvar_.wait(lk, [this] {
return signal_.load(std::memory_order_relaxed) ||
!do_run_.load(std::memory_order_relaxed);
return signal_.load(std::memory_order_relaxed) || !do_run_.load(std::memory_order_relaxed);
});
}
@@ -87,8 +86,7 @@ class SleeperThread {
wait_end = now + dur;
}
return condvar_.wait_until(lk, wait_end, [this] {
return signal_.load(std::memory_order_relaxed) ||
!do_run_.load(std::memory_order_relaxed);
return signal_.load(std::memory_order_relaxed) || !do_run_.load(std::memory_order_relaxed);
});
}
@@ -98,8 +96,7 @@ class SleeperThread {
std::unique_lock lk(mutex_);
CancellationGuard cancel_lock;
return condvar_.wait_until(lk, time_point, [this] {
return signal_.load(std::memory_order_relaxed) ||
!do_run_.load(std::memory_order_relaxed);
return signal_.load(std::memory_order_relaxed) || !do_run_.load(std::memory_order_relaxed);
});
}