Closed brandonsturgeon closed 8 months ago
If indexing is a problem, couldn't you take the functions from the metatable directly and just use those?
I'd like to fix the linting issues in this file. I could do it in this PR while I'm here, or I could do it in a followup PR - up to you 👍
GetVar
uses GetTable
internally and has overhead for a default value so I would prefer just using GetTable
.
Simple optimization to reduce entity
__index
calls for this commonly-used method. With only a few EGPs out, I recorded 77,762__index
calls from this method over a 10 second sample.Also, from a high-level skim, it seems like this could even be cached on the EGP entity itself to make it even faster.