mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1754] glb_skinning: avoid copying padded BIN data for every accessor #1767
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1767
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1754
Author: @kirigayakazima
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:codex/glb-skinning-padded-buffer-copies📝 Commits (1)
0307e4cglb_skinning: avoid copying padded BIN data for every accessor📊 Changes
2 files changed (+40 additions, -7 deletions)
View changed files
📝
tests/test_glb_skinning.py(+29 -0)📝
tools/glb_skinning.py(+11 -7)📄 Description
Claimed in the coordination issue as: GLB-SKINNING-PADDED-BUFFER-COPIES
What and why
The analyzer copied each chunk before determining its purpose and sliced the BIN bytes down to the declared buffer length on each accessor read. With 1–3 bytes of alignment padding, each slice copied the entire buffer. Analysis now reads from a view of the original immutable bytes and enforces the existing declared-length checks. The public
parse_glbhelper still returns BIN bytes.Tested
On the integration checkout a synthetic three-vertex model with a 16 MiB padded BIN and a 16 MiB extension chunk produced identical reports before and after. Starting tracemalloc after constructing the input, peak traced allocation during analysis fell from 33,562,127 to 8,532 bytes (Python 3.14.7). The regression uses smaller chunks and also checks that a buffer view cannot read into BIN padding.
python -I tests/test_glb_skinning.pypassed all 28 tests on this branch (Windows, Python 3.14.7).git diff --checkand the repository game-data scan of all changed paths passed.bcaa13dapassed 6,287 semantic tests across 488 files.GPUs tested: N/A (CPU-only asset tooling).
AI-assisted: Yes.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.