Skip to content

[Suggestion/Optimization]: String formatting in validateCapability uses a non-negligable amount of resources #118

@ShaneParslow

Description

@ShaneParslow

Mod Loader (Optional)

Forge

Minecraft Version(s) (Optional)

1.19.2

Mod Version(s) (Optional)

4.4.3

Suggestion (Required)

validateCapability in ForgeCapabilityKey uses a fair amount of resources on the main thread for string formatting, regardless of whether the capability is null or not. Changing the string to a constant or using the Supplier<String> overload should fix the issue. I see that the same paradigm is used in a few other places throughout the repo, but I haven't seen issues with any of those.

This seems to significantly hurt the performance of Thin Air, specifically.
thinair_profile

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions