9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-19 15:09:27 +00:00
Commit Graph

64 Commits

Author SHA1 Message Date
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