d2phap / d2phap/ImageGlass

AVIF doesn't respect max cache size

Open
#2,390 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

🐞 bug
Dominant language
C#
Stars
14.4k
Forks
752
Avg merge
10d 14h
Merged PRs (30d)
1

Description

Windows OS version

Windows 11 23H2 Build 22631.6199

ImageGlass version

9.6.0.801

ImageGlass release

Classic

1️⃣ Steps to reproduce

1: set maximum file size to be cached to 20MB and number of images to cache to 1.
2: place a small image (7MB PNG) and a large animated avif (70MB in my case) in a folder beside each other.
2: load the small image next to an animated avif.

2️⃣ Actual behavior

it takes forever to load a little 7MB PNG because it incorrectly caches the 70MB avif beside it.

3️⃣ Expected behavior

it should ignore the avif because it's over the 20MB cache limit.

4️⃣ Screenshots / Video / Sample image file

https://github.com/user-attachments/assets/515b7657-6009-4191-a0a9-64721eaef995

5️⃣ Additional context

I tried it with a 480MB PNG next to the file and it properly ignored it.
I got the avif from here. https://github.com/d2phap/ImageGlass/issues/2033

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in ImageGlass Classic on Windows with the cache size set to 20MB and one cached image, using the linked 70MB animated AVIF beside the 7MB PNG. Trace the cache-size check during AVIF loading and compare it with the PNG behavior; done means the oversized AVIF is skipped and the PNG loads without the delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.