Release 2.8.2: ignore sub-64 KB heap drops in the weirdperformance cycle counter

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwtugSE5NbbiWQCbbKX
This commit is contained in:
OEVG
2026-11-03 02:57:06 +00:00
co-authored by Claude Sonnet 5.5
parent 109335a325
commit 1c317a0cb8
5 changed files with 28 additions and 5 deletions
+7
View File
@@ -3,6 +3,13 @@
All notable changes to this OctoWoW edition of Gentle GC. Versions follow
`GentleGC.toc`. Dates are the commit dates (UTC).
## 2.8.2 - 2026-11-02
### Fixed
- The weirdperformance cycle counter in `/ggc` also counted heap drops of a few KB
(40 "cycles" freeing 1.3 MB in all). Drops under 64 KB are no longer counted or
printed; they are still not blamed on an unknown addon.
## 2.8.1 - 2026-11-02
### Fixed
+6 -3
View File
@@ -350,9 +350,12 @@ local function Sync()
-- someone called collectgarbage; we can't tell, and it isn't a cached call.
minor = true
liveKB = used
wpStat.minor = wpStat.minor + 1
wpStat.minorKB = wpStat.minorKB + (lastUsed - used)
if DebugLevel() >= 2 then
-- drops under 64 KB are noise (a few strings dying); don't count or print them
if lastUsed - used >= 64 then
wpStat.minor = wpStat.minor + 1
wpStat.minorKB = wpStat.minorKB + (lastUsed - used)
end
if lastUsed - used >= 64 and DebugLevel() >= 2 then
Msg(format("weirdperformance cycle: freed %.1fmb (heap %.1f -> %.1fmb, threshold %.1f -> %.1fmb)",
MB(lastUsed - used), MB(lastUsed), MB(used), MB(oldThreshold), MB(threshold)))
end
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: Gentle GC
## Notes: Schedules Lua garbage collection for moments you won't notice
## Author: Weird Vibes (MarcelineVQ); forks by TheRealFayz, jrc13245
## Version: 2.8.1
## Version: 2.8.2
## SavedVariables: GentleGCDB
GentleGC.lua
+1 -1
View File
@@ -2,7 +2,7 @@
[![ClassicAPI](https://img.shields.io/badge/ClassicAPI-Optional-yellow.svg)](https://github.com/brues-code/ClassicAPI) [![weirdperformance](https://img.shields.io/badge/weirdperformance-Optional-yellow.svg)](https://codeberg.org/MarcelineVQ/WeirdUtils)
Gentle Garbage Collection, unified edition (v2.8.1), maintained for OctoWoW.
Gentle Garbage Collection, unified edition (v2.8.2), maintained for OctoWoW.
For WoW 1.18.1 clients (Lua 5.0).
+13
View File
@@ -105,4 +105,17 @@ check("with heap and threshold numbers", string.find(lastMatch("collection by un
cmd("status")
check("listed under other addons", has("by other addons: 1"))
print("3. a drop of a few KB is not counted")
roomy()
seconds(2)
clear()
GARB = {}
for i = 1, 300 do GARB[i] = { i } end
seconds(1)
GARB = nil
origCG(); origCG(math.floor(gcinfo() * 1.25))
seconds(2)
check("tiny drop not printed as a cycle", not has("weirdperformance cycle: freed"))
check("tiny drop not an unknown addon", not has("collection by unknown addon"))
print(FAILED and "SOME TESTS FAILED" or "ALL TESTS PASSED")