-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruleset.CreateIcon is inefficient in ruleset usages #11240
Comments
While looking into fixing this, we should also consider that calls to |
like a default ruleset icon if no specific-ruleset icon is found? the order [api -> local ruleset icon -> default ruleset icon] would make sense imo |
I don't think you understand what you're saying here. This doesn't need open discussion; it's an issue (causing potential crashes) purely at the |
my mistake |
Some rulesets have more proper logic that performs a once-off registration of their resource store at game-level. It looks like a viable alternative, at least when it comes to the performance side of things, but I'm not sure if I like it 100%. It's a bit of a scary change to make since namespacing will begin to be a problem. I also thought about having a separate texture store for just the icons in |
That kind of "proper logic" is literally game breaking, and would not be allowed in a ruleset which is approved for ranking etc. (polluting a global texture store with one provided by a ruleset). This could be used to manipulate gameplay outside of the ruleset itself, after all. I'd say that we do want to cache or maintain resource stores locally in |
Sure, I didn't intend to say it was completely correct, rather than it just being "more proper" from a performance standpoint. I understand the namespacing implications. |
It came to my attention that some rulesets are using sprites for their icons, creating a new
TextureStore
every call toCreateIcon()
. This is super inefficient and may lead to memory exhaustion.The text was updated successfully, but these errors were encountered: