Issue #2928 - Improve imgLoader cache queue handling.

- Convert the imgCacheQueue to nsTArray from Vector
- Avoid marking the queue dirty when element operations are performed
that don't upset the sort order. This should improve performance as well.
This commit is contained in:
Moonchild 2026-02-04 09:19:05 +01:00 committed by wuggy
commit bc0dbe9abb
2 changed files with 52 additions and 17 deletions

View file

@ -178,7 +178,8 @@ public:
uint32_t GetSize() const;
void UpdateSize(int32_t diff);
uint32_t GetNumElements() const;
typedef std::vector<RefPtr<imgCacheEntry> > queueContainer;
bool Contains(imgCacheEntry* aEntry) const;
typedef nsTArray<RefPtr<imgCacheEntry> > queueContainer;
typedef queueContainer::iterator iterator;
typedef queueContainer::const_iterator const_iterator;