- Joined
- Apr 13, 2008
- Sythe Gold
- 0
- Messages
- 212
Okay, well in java if you want faster preformance mostly in RSPS, or if you want to keep down the load in your vps, you have to use last used/system's last checked so a cached (x).
X - the object you want to cache/use last one server had.
Well, I've seen a bunch of server's without cached stuff so it made them laggy.
This is java btw, for all the beginners.
A few thing you will need to know,
Your java repository
,
how your system works.
Let's do an example with RSPS.
We have a failed coded RSPS so let's use a PI.
So... Let's say you wanted to use the last time system caught this as a timer?
Let's make a timer.java and let's put this:
now use that as a referance.
public long omglong;
omgnewb = new timer(omglong);
so it will start up timer and put the last sytem found for omglong.
so let's do a more advanced one, caching your update block.
You know this will take a load off the server and speed up server processing but not that much tho.
Stream usually handles our update blocks.
appendPlayerUpdateBlock hold our update blocks.
so we simply make a method:
so now in appendPlayerUpdateBlock we make it check
again this is sample code.
anyways, just make a referance to the object you want to have a referance to in the future, then make it check/use it.
This is basic and simple. ^_^
X - the object you want to cache/use last one server had.
Well, I've seen a bunch of server's without cached stuff so it made them laggy.
This is java btw, for all the beginners.
A few thing you will need to know,
Your java repository
how your system works.
Let's do an example with RSPS.
We have a failed coded RSPS so let's use a PI.
So... Let's say you wanted to use the last time system caught this as a timer?
Let's make a timer.java and let's put this:
Code:
public class timer {
public timer(int timers) {
timers = System.currentMilliS;
}
}
now use that as a referance.
public long omglong;
omgnewb = new timer(omglong);
so it will start up timer and put the last sytem found for omglong.
so let's do a more advanced one, caching your update block.
You know this will take a load off the server and speed up server processing but not that much tho.
Stream usually handles our update blocks.
appendPlayerUpdateBlock hold our update blocks.
so we simply make a method:
Code:
public Stream cachedupdateblock;
public Stream hascachedupdateblock() [
cachedupdateblock != null;
}
so now in appendPlayerUpdateBlock we make it check
Code:
if(hascachedupdateblock() && !updateRequired) {
getcachedupdateblock();
}
again this is sample code.
anyways, just make a referance to the object you want to have a referance to in the future, then make it check/use it.
This is basic and simple. ^_^


