-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Admin/Commands/Core/Process.lua | Optimizations #540
Conversation
`Admin`: switched some string metamethods Cached to some tables that could possibly get huge (depends if on settings and datastores) `Commands`: Switched to getEnv instead of giving the commands env. `Core`: `GetDataStore` will now check if you can actually set Data in studio first before setting to prevent a big warn pileup if they are disabled. Switch of `next` to `pairs` More caching to datastores (datastore entries can get really big in size overtime so having it be pretty fast is essential) `Process`: `OnSpawn` and `OnJoin` will run synchronous to prevent yields to the function. `Service`: Changing of string metamethods.
@@ -1028,8 +1044,9 @@ return function(Vargs) | |||
end; | |||
|
|||
IsBlacklisted = function(p) | |||
for i,list in next,Variables.Blacklist.Lists do | |||
if Admin.CheckTable(p, list) then | |||
local CheckTable = Admin.CheckTable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to store in variable when it is only being used once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends on how big the blacklisted table could be and instead of indexing the admin just to get checktable possibly for a huge amount could take a toll on some performance.
@@ -591,8 +592,9 @@ return function(Vargs) | |||
if Variables.Whitelist.Enabled then | |||
local listed = false | |||
|
|||
for listName, list in next,Variables.Whitelist.Lists do | |||
if Admin.CheckTable(p, list) then | |||
local CheckTable = Admin.CheckTable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to store in variable when it is only being used once
`Service`: Service will setfenv inside the called func to prevent some reduced setting of a functions env. `Server`: Removed a few useless tables (LSP said they weren't used) switched from next to ipairs/pairs `Client`: Localized the Localized. Switched from next to ipairs/pairs Prevented WaitForChild from outputting a warning if ever possible.
Admin
:switched some string metamethods
Cached to some tables that could possibly get huge (depends if on settings and datastores)
Commands
:Switched to getEnv instead of giving the commands env.
Core
:GetDataStore
will now check if you can actually use DataStores in studio first before setting to prevent a big warn pileup if they are disabled.Switch of
next
topairs
More caching to datastores (datastore entries can get really big in size overtime so having it be pretty fast is essential)
Process
:OnSpawn
andOnJoin
will run synchronous to prevent yields to the function.Service
:Changing of string metamethods.