Skip to content

performance enhancements in lua object pushes - #6053

Open
ab9rf wants to merge 3 commits into
DFHack:developfrom
ab9rf:api-performance
Open

ab9rf wants to merge 3 commits into
DFHack:developfrom
ab9rf:api-performance

Conversation

@ab9rf

@ab9rf ab9rf commented Dec 4, 2026

Copy link
Copy Markdown
Member

These modifications provide a roughly 30% performance increase in bulk pushes of metadata objects into Lua tables by memoizing the last virtual table lookup and by leveraging the bidirectionality of the registry index to avoid doing repeated lookups for the same type identity

ab9rf added 3 commits December 4, 2026 10:39
These modifications provide a roughly 30% performance increase in bulk pushes of metadata objects into Lua tables by memoizing the last virtual table lookup and by leveraging the bidirectionality of the registry index to avoid doing repeated lookups for the same type identity
these changes enable metadata lookup caching and reuse, which provides further performance improvements for common bulk object operations - `getContainedItems` can see as much as a 50% improvement in performance
my local copy of dreamfort is out of date relative to the one in CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant