VORPCORE / VORP-Hunting

Selling Animals & Skins script
GNU General Public License v3.0
6 stars 21 forks source link

optimizations #56

Closed jakeyboi1 closed 1 year ago

jakeyboi1 commented 1 year ago

Was scrounging around the code, and noticed it looks old, incredibly outdated, and hasnt been updated in a bit. Did some small optimizations, and standardizing to help performance, and just in general make the code better to read and look at.

outsider31000 commented 1 year ago

because you cant store more than 3 pelts no matter the amount you put

jakeyboi1 commented 1 year ago

ahh valid just tossed the limiter back in along with a comment in the config to clarify that hard limit

outsider31000 commented 1 year ago

image what was the reason to remove this break ? so if you found the item why should it continue to loop ?

image why did you have to remove the brackets ? they are conferting the variables to true or false statments

image i also dont understand why all lthe while loops were increased when theres prompts to be shown that need to have a check at all frames

jakeyboi1 commented 1 year ago

The break was not removed ofcourse that is less optimal it was just moved onto the same line skinfound = k which was right below the red code loll not sure how you didnt see that image

the brackets are just not needed so why have them there it makes the code uglier for no reason

the while loops do not need to be so low 5ms works perfectly fine and increases performance by adding a few more ms of wait

outsider31000 commented 1 year ago

and noticed it looks old, incredibly outdated, this statement did not make much sense because anything you changed had nothing to do with being incredible outdated removing wording symbolizing that this script will run with fivem runtime Citizen, and adding joaats doesnt nor really make it up to date

outsider31000 commented 1 year ago

nothing you did made it up to date neither optimised i dont see why this should be merged as it looks like its just a preference

jakeyboi1 commented 1 year ago

It is litrally just a performance thing. It lowered the amount of resources the script uses in resmon, breaks nothing, and makes the code a bit easier to read. Not sure why you wouldnt merge it lol

outsider31000 commented 1 year ago

because it adds nothing to it its just a preference in code like removing brackets that you have no idea what they are for , waits need to be at 0 not everyone uses the same computers , your statment said its incredible outdated , nothing you added made it up to date

outsider31000 commented 1 year ago

you want to make it up to date add notifications with API for example, use vorp utils as well you wnt to make it optimised add sleeping controllers to the threads increasing wait times does not work for everyone with slower computers the promtps will blink

jakeyboi1 commented 1 year ago

You are completely correct Outsider