Limelight Forums

Full Version: Dev Blog #2 - Optimisation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The second dev blog. I can't promise a blog as riviting and easy to understand as 's Last Dev Blog, though I'll try.

Optimisation, it's a tricky topic.
What are we doing and where are we going?

Optimisation is a complaint we get a lot of complaints about, from the community, from staff and from me; yet fixing it isn't as simple as flicking a switch.

We've put a lot of planning into ensuring that the optimisation we do is actually worth it, and improves things for you, rather than just chucking code into the window, and praying for an improvement.

[Image: dfd887b77e07dfdfbcea03ae4afdd3f7.png]
Initial planning - We're still only on Stage 2.

[Image: unknown.png]
Collected Data on Optimisation

Stage 1 - Data Collection
We've done a lot of data collection on the baseline, as you can see. We can move on from that, thankfully. There'll be more to do in time, but for now we can leave it.

Stage 2 - Networking
At higher populations, FPS can be bad, but normally it's not the worst. At higher populations, pings start shooting through the roof. We've already done some work with network optimisation in Revision 5368 but we still have more work to do. However, we've got pings down to an acceptable level, so we can focus more on clientside issues.

How to Optimise
In general, resolving the issues we have is two-fold.

Firstly, we can reduce what we do. For example, instead of using heavy functions, we can use lighter approximations (these things don't need to be perfect, only good enough). This reduces the amount of work either you or the server have to do.

Secondly, we can reduce the number of times we do things. A light function becomes heavy if you use it 50000000 times a second. I can't really go into more detail, because it's always dependent on the individual bit of code being worked on. However, most of the times we can try and cut out useless or redundant loops, try not looping etc.

Why was this never done before?
It's difficult to say, because there's so many reasons.

Firstly, the history of CityRP has a lot to do with it.
[Image: unknown.png]

We're so old, there's a lot of older bits of code which need to be remover, but haven't been yet.

Secondly, we've had some poorer development practices in the past. Most of our developers haven't come from software development backgrounds. For example, is self-taught. This has led to things sometimes being suboptimial. However, we are working to bring everyone up to speed, to ensure that future code is optimised, and as I said before, we're going over and rectifying the past now.


That's optimisation, that's what we've done and what's happening.
ok yes good
[Image: giphy.gif]
Good luck with optimisation then!

, Mavis & The Doctor are the SAME person, lol.
This is what I love to see, keep up the great work!