fix: avoid searching for icons that previously could not be found
Causes significant CPU usage in some areas
This commit is contained in:
parent
7a4d94f951
commit
a28483f3d1
1 changed files with 4 additions and 2 deletions
|
|
@ -288,8 +288,10 @@ impl<'a> LookupBuilder<'a> {
|
|||
// If the icon was previously search but not found, we return
|
||||
// `None` early, otherwise, attempt to perform a lookup
|
||||
if self.cache {
|
||||
if let CacheEntry::Found(icon) = self.cache_lookup(self.theme) {
|
||||
return Some(icon);
|
||||
match self.cache_lookup(self.theme) {
|
||||
CacheEntry::Found(icon) => return Some(icon),
|
||||
CacheEntry::NotFound => return None,
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue