9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-28 03:19:07 +00:00
Commit Graph

33 Commits

Author SHA1 Message Date
MrPowerGamerBR
a93396ebe5 Skip dirty stats copy when requesting player stats
There's literally only one getDirty call. Because the map was only retrieved once, we don't actually need to create a copy of the map just to iterate it, we can just access it directly and clear it manually after use.
2023-11-22 14:45:25 -03:00
MrPowerGamerBR
50c98ccbd5 [ci skip] README changes 2023-11-22 14:11:16 -03:00
MrPowerGamerBR
9715e4901d [ci skip] README changes (again) 2023-11-22 11:47:58 -03:00
MrPowerGamerBR
f75bd46df6 [ci skip] README changes 2023-11-22 11:47:35 -03:00
MrPowerGamerBR
b4a0b43344 Add build without Parallel World Ticking 2023-11-22 11:29:10 -03:00
MrPowerGamerBR
8dbc519375 Cache coordinate key used for nearby players when ticking chunks
The "getChunkKey(...)" call is a bit expensive, using 0.24% of CPU time with 19k chunks loaded

So instead of paying the price on each tick, we pay the price when the chunk is loaded

Which, if you think about it, is actually better, since we tick chunks more than we load chunks
2023-11-22 11:10:54 -03:00
MrPowerGamerBR
5457114057 [ci skip] README changes 2023-11-22 01:56:46 -03:00
MrPowerGamerBR
53dcccb2a5 Cache tracking range type enum ordinal
Yes, I was shocked, flabbergasted even, when I found out that "Enum.ordinal()" was lagging here

But I guess it makes sense: It is a function that is called every tick for each entity, and it is a bit wasteful converting from enum to ordinal every time
2023-11-22 01:51:29 -03:00
MrPowerGamerBR
d03d4b9f1d [ci skip] README changes (again) 2023-11-21 23:34:38 -03:00
MrPowerGamerBR
6e8885ab81 [ci skip] README changes (again) 2023-11-21 23:33:27 -03:00
MrPowerGamerBR
af841d584c [ci skip] README changes 2023-11-21 23:26:52 -03:00
MrPowerGamerBR
3f47e18bc4 Improve EntityScheduler optimization patch even... further... beyond! 2023-11-21 23:22:17 -03:00
MrPowerGamerBR
4d91dd604d Improve EntityScheduler optimization patch 2023-11-21 21:10:07 -03:00
MrPowerGamerBR
dfe57f34c4 Spooky month optimizations
The quintessential patch that other performance forks also have for... some reason

Caches when Bat's spooky season starts and ends, and when Skeleton and Zombies halloween starts and ends

Avoids unnecessary date checks, even tho that this shouldn't really improve performance that much... unless you have a lot of mobs being spawned
2023-11-21 17:08:58 -03:00
MrPowerGamerBR
96c5de6f94 Add option to change crops to go from first age to last age directly, to avoid useless block updates 2023-11-21 16:14:45 -03:00
MrPowerGamerBR
d80994bccc [ci skip] Update README 2023-11-21 12:21:22 -03:00
MrPowerGamerBR
0d0706ff13 Blazingly Simple Farm Checks 2023-11-20 23:07:10 -03:00
MrPowerGamerBR
3f75b842ed [ci skip] README changes 2023-11-20 14:50:58 -03:00
MrPowerGamerBR
82aee81eac [ci skip] Derp 2023-11-19 14:19:16 -03:00
MrPowerGamerBR
339d27f15c Replace item frame patch 2023-11-19 14:17:46 -03:00
MrPowerGamerBR
e028bd5157 Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
On each tick, Paper runs EntityScheduler's executeTick of each entity. This is a bit expensive, due to ArrayDeque's size() call because it ain't a simple "get the current queue size" function, and due to the thread checks.

To avoid the hefty ArrayDeque's size() call, we check if we *really* need to execute the executeTick, by checking if currentlyExecuting is not empty or if oneTimeDelayed is not empty.

Most entities won't have any scheduled tasks, so this is a nice performance bonus. These optimizations, however, wouldn't work in a Folia environment, but because in SparklyPaper executeTick is always executed on the main thread, it ain't an issue for us (yay).
2023-11-19 13:41:45 -03:00
MrPowerGamerBR
3e549c4903 New optimization patches 2023-11-18 21:32:54 -03:00
MrPowerGamerBR
4bf4b3c60a [ci skip] Improve wording 2023-11-17 19:42:09 -03:00
MrPowerGamerBR
f7a3b8585c [ci skip] Add small "locked" map performance tip 2023-11-17 19:31:51 -03:00
MrPowerGamerBR
7907eb6a8f [ci skip] Whoops 2023-11-17 19:22:29 -03:00
MrPowerGamerBR
4098309e79 Refactor MapItem update skip, add synchornized to CraftMapColorCache's "isCached" function 2023-11-17 19:13:56 -03:00
MrPowerGamerBR
eed11e38b2 Skip "MapItem#update()" if the map does not have the CraftMapRenderer present
Optimizes "image in map" maps, without requiring the map to be locked, which some old map plugins may not do

This has the disadvantage that the vanilla map data will never be updated while the CraftMapRenderer is not present, but that's not a huuuge problem for us
2023-11-17 15:02:07 -03:00
MrPowerGamerBR
a5a401b566 [ci skip] More readme changes 2023-11-17 12:49:04 -03:00
MrPowerGamerBR
30bd3d6baa Update docs 2023-11-17 12:42:08 -03:00
MrPowerGamerBR
7b92cb8f66 Experimental Parallel World Ticking 2023-11-12 20:18:51 -03:00
MrPowerGamerBR
4e105d3f9f Let's start from scratch, shall we? 2023-10-31 00:53:47 -03:00
MrPowerGamerBR
aa295c78bc Update upstream, add new cherry-picked patches from other forks 2023-10-23 01:40:30 -03:00
MrPowerGamerBR
12ada64542 First commit! 🎉 2023-10-22 11:17:21 -03:00