Hero192 Posted March 2, 2016 Share Posted March 2, 2016 Well, I am a guy who cares alot about avoiding cpu usage, so yeah I wanted to be sure of one information since I didn't find it in the wiki. I had scripted a function and instead of re-scripting it in the whole gamemode resources, I used exports system to save some memory, But I am afraid if these exports might cause lags/CPU Usage or not. I just need a confirmation. ~Thanks in advance. Link to comment
MTA Team botder Posted March 2, 2016 MTA Team Share Posted March 2, 2016 Test package: https://mega.nz/#!kYVzzaAb!CUEWe9llnrld ... 5sHrCgZRu0 Result: [Local] (5s) Calls: 5534587 [Export] (5s) Calls: 537927 [Local_Long] (5s) Calls: 1471 [Export_Long] (5s) Calls: 1421 [Local_Long_Long] (5s) Calls: 707 [Export_Long_Long] (5s) Calls: 718 Legend: Local is a resource-local function Export is a foreign-resource export function Long is a loop with 5000 iterations Long Long is a loop with 10000 iterations Summary Local functions are super fast, but they are technically equal to the exported functions when they iterate a lot. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now