Skip to content

[QA] Section | LRUDiskCleanUp allocates too much memory too often #5991

@AnsisMalins

Description

@AnsisMalins

🛠️ Build version:

feat/clearscript-7?5

📔 Issue Description:

Various disk cache code, LRUDiskCleanUp in particular, allocates too much memory too often. Calculation of file paths allocates a small amount, but it is called around 300 times, and it adds up. Another example is hash calculations that allocate 20 KB per frame in which disk cache is used.

👣 STR:

  1. Spawn into the game
  2. Wait for allocation spikes in the profiler. They come once every second or so

✔️ Expected Result:

Zero allocations, lol! Okay, as few allocations as possible, and there are comments in the code for the cases that could not be optimized to zero.

Actual Result with evidence:

Image Image

Reproduction:

🔁 Always - (note)

The code allocates every time it runs.

🖥️ Operative system and additional Notes:

Windows 10

Metadata

Metadata

Assignees

Labels

2-mediumAffects secondary features or support features; doesn’t block main flows.bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions