Things to Optimise Besides Speed and Memory - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Discussion (
https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: Things to Optimise Besides Speed and Memory (
/showthread.php?tid=359262)
Things to Optimise Besides Speed and Memory -
Y_Less - 13.07.2012
http://prog21.dadgum.com/145.html
Since people here love "optimisation" so much.
Re: Things to Optimise Besides Speed and Memory -
Chaprnks - 15.07.2012
The most beneficial optimization IMO: script organization. Can't tell you how many times I've had code that I made a ways back; but forgot to make a note where all of its portions are.
Re: Things to Optimise Besides Speed and Memory -
leonardo1434 - 15.07.2012
Best tip is: Follow Y_less & Slice step's, try understand his codes and do it by yourself. Then, you can move on to better steps.
Re: Things to Optimise Besides Speed and Memory -
CyNiC - 15.07.2012
I see this situation as follows: Scripters that program by funny, virtual fame or hobby tend to be looking for optimisation at all the time(trying to "fix" any code even if it is perfect), since that they have nothing more productive to do due to lack of creativity, courage, determination.
Re: Things to Optimise Besides Speed and Memory -
AndreT - 15.07.2012
Quote:
Originally Posted by CyNiC
I see this situation as follows: Scripters that program by funny, virtual fame or hobby tend to be looking for optimisation at all the time(trying to "fix" any code even if it is perfect), since that they have nothing more productive to do due to lack of creativity, courage, determination.
|
You managed to summarize my lack of creativity for new features and compensating it by optimizing with just one sentence.
Reputation.
Re: Things to Optimise Besides Speed and Memory -
[HLF]Southclaw - 18.07.2012
I try to optimise my code for the end user (and maintenance) as much as I do for bandwidth usage and file access.
For instance I had a 1 second timer for a distance clock and timer for races, but it looked shit! So I used OnPlayerUpdate and it looks a lot better, like a "real" game as the timer shows Milliseconds and the fast distance updates look... just... it's hard to explain but because it's faster it just looks more polished and fancy!
So I've started using OnPlayerUpdate a hell of a lot now for loads of things, mainly GUI just so things look nice for the players! And if they have bad ping and lag a bit? I guess it's their problem sort of... (Bad attitude?)
Anyhow, I understand what you mean, I will try to take more things into account while making things (I tend to go for amount of features for the players first then optimisation second)
Re: Things to Optimise Besides Speed and Memory -
Extremo - 18.07.2012
Good read, though I've gotta say that there's a big trend out there for you all to optimize code more and more to when it even becomes pointless.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil" - Donald Knuth
http://prog21.dadgum.com/106.html