Commit Graph

55 Commits

Author SHA1 Message Date
Aikar ed9a89e82e
Improvements to Timings Performance
1) Get rid of string interning. can be heavy, has been seen to cause issues for some users
2) Use ConcurrentHashMap instead of a SynchronizedMap
3) Stop use of MRUMapCache which is not thread safe for Group lookups
4) Stop using IdentityHashMap which has performance issues in Java 8
2018-10-17 22:09:08 -04:00
Zach Brown cfc7baeefb
Add support for Java 11 to deprecated Timings API
In Java 11 the internal reflection method used to determine the calling
class in the legacy and deprecated Timings API, that no one should be
using anymore, was removed.

This means plugins that try and use it will all fail to enable and we
can't compile the server with JDK 11.

The solution to the removal of this internal reflection class is
to just use reflection to call it if its available and fall back to
the unnamed handler system if it isnt.

Update to the newer API if you use Timings already...
2018-09-29 14:05:24 -04:00
Aikar 917d582441
[Auto] Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
b9620fd9 API to generate filled explorer maps

CraftBukkit Changes:
c1ecaa2f API to generate filled explorer maps
2018-09-24 05:41:32 -04:00
Aikar 50768eb975
Improvements to Timings
With 1.13, the idea of accessing chunks async is going to have to
be supported with the push towards thread safe chunk access mojang
has done.

This commit changes timings to always thread check at start and stop
timings and only mutate state on main thread.

This makes startTimingIfSync pointless, but I'm just going to leave
it as is.

Timings will no longer complain when used async, it just will not
do anything.

Further concurrency issues have been addressed with creating
timings handlers that may of overall been an issue for any handler
that might of been created async (happened even for things that
only timed sync)

with that, the 'protected' concept of handlers has been removed,
and 'plugin' vs 'safe' handlers are now the same.

Got rid of some guava functions in favor of java 8 real stuff now too.
2018-08-30 20:43:15 -04:00
Aikar 765a548c68
[Auto] Updated Upstream (Bukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
aa81efb0 Remove some additional draft API markings
2018-08-29 03:09:34 -04:00
Aikar 3a70bed5f4
Updated Upstream (Bukkit/CraftBukkit) for LootTable API
I have tested that the Replenishing Feature still works as expected.
Lootable API's that now have Bukkit equivalents are now deprecated.

Bukkit Changes:
f0f33981 SPIGOT-1936: LootTable API

CraftBukkit Changes:
c0df4b82 SPIGOT-1936: LootTable API
2018-08-12 13:11:13 -04:00
Aikar 4bb44d2fcb
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
c23d391f Update documentation of BlockPhysicsEvent
14fcd896 SPIGOT-4258: Add Player.updateCommands method

CraftBukkit Changes:
15da7067 SPIGOT-4258: Add Player.updateCommands method

Spigot Changes:
2b0e71c7 Rebuild patches
2018-08-12 02:08:09 -04:00
Shane Freeder c2c18b2b7f
Don't reset current tick based on system time 2018-08-10 15:27:42 +01:00
Aikar 566740114e
update upstream 2018-07-29 12:42:07 -04:00
Aikar 48d75228ed
Update upstream 2018-07-25 19:05:07 -04:00
Shane Freeder 1fe8472503
update B/CB/S 2018-07-20 20:57:43 +01:00
Aikar 5b6dfb3463
NOT FINISHED!!! Current Progress on 1.13-pre7 update
This work is 100% unfinished. I am pushing it up so that we as a team
can work on this update.

Do not try to use this branch. You will fail.
2018-07-16 00:13:29 -04:00
Aikar a8c28e1920
Initial Paper-API for Bukkit 1.13 Preview 4 - THIS IS NOT SERVER
This branch/commit is only useful to those who purely use a clean Bukkit/Spigot/Paper API
and does not use NMS/OBC references.

This will let you start updating your plugin to the latest 1.13 builds of Bukkit Preview (4 as of now)

Note that this release is not final!!! API breakages may occur!

It is up to you if you find use out of this work.
2018-07-14 21:53:22 -04:00
Aikar 18c3716c49
Current Chunk for Entity and Block Entities, counts by entity type
This enables us a fast reference to the entities current chunk instead
of having to look it up by hashmap lookups.

We also store counts by type to further enable other performance optimizations in later patches.
2018-07-04 03:58:56 -04:00
Zach Brown eb0f5adfdc
Update upstream B/CB/S 2017-12-27 22:45:33 -06:00
Shane Freeder a693cb21ab
Update B/CB/S 2017-12-05 01:34:10 +00:00
Shane Freeder 1d03f56bd6
Update B/CB/S 2017-11-08 16:13:57 +00:00
Aikar ff5bd7b03b Upstream update 2017-08-07 23:05:16 -04:00
Shane Freeder 18be9d24e4
Update B/CB 2017-07-10 14:04:41 +01:00
Zach Brown b1d34f6180
Make timings more tolerant of corrupt chunks
Fixes GH-744
2017-07-02 20:54:29 -05:00
Zach Brown fe4678c414
Properly fix JavaDoc linting issues
Fixes our own, and upstream's, issues with the stricter Java 8 JavaDoc
linter.

Also removes the destroystokyo-release maven repository. I'm not sure
why I added it originally, but it's unnecessary now.
2017-06-10 17:12:48 -05:00
Zach Brown 066f383b95
Update upstream B/CB/S 2017-05-27 23:25:17 -05:00
Zach Brown 720769bf30
Update upstream B/S 2017-05-23 17:11:28 -05:00
Zach Brown baf762a2c1
Update upstream B/CB/S 2017-05-15 11:25:20 -05:00
Zach Brown 828d600143
Update API patches to MC 1.12pre2 2017-05-14 08:46:44 -05:00
Zach Brown e4a071f6e4
Update upstream B/CB 2017-03-31 23:24:42 -05:00
Zach Brown ae98591b8c
Update upstream B/CB/S 2017-02-17 20:03:38 -06:00
Aikar ee7f13ea3c Add API to get the url in a timing report listener 2017-02-04 23:07:09 -05:00
Aikar d033b57b47 More improvements to Timings, RCON now is no longer blocking!
Finally made timings accept "Callback style" reports, so plugins
can listen for when the report is done.

Added new Util interfaces, MessageCommandSender and BufferedCommandSender

This restores and improves using RCON to generate timings reports
2017-02-04 22:47:39 -05:00
Aikar f938ae30fd Run timings reports after end of tick
I believe we are getting data corruption by doing it in the middle of the tick, as I was seeing
really odd reports from automated ones vs command ones.

This will break issueing timings over rcon single command mode and getting the report link in the response back

But I will try to restore that (and make RCON no longer cause spikes) soon.

Reports will still generate, just because its async, the RCON connection
will drop if not in terminal mode before its done.
2017-02-04 20:46:27 -05:00
Zach Brown 63130fd2aa
Update upstream B/CB
Closes GH-569
2017-01-06 15:45:59 -06:00
Zach Brown 1d8b7e2ecc
Update upstream B/CB 2016-12-16 15:00:16 -06:00
Zach Brown 97e0eac6e7
Update upstream B/CB 2016-11-21 15:51:27 -06:00
Aikar 9725050889 Update Upstream 2016-11-18 23:58:56 -05:00
Zach Brown a6d146a939
Update Paper to MC 1.11 2016-11-18 16:21:06 -06:00
Zach Brown 0860727dae
Update upstream S 2016-10-26 16:05:22 -05:00
kashike 3d5f59c855 Fix @aikar's oops with verbose timings 2016-09-23 23:19:15 +00:00
Zach Brown f9f96ea3a5
Update upstream B/CB/S 2016-09-02 22:44:52 -05:00
Zach Brown b170e8cedb
Update upstream B/CB/S
Remove two features added upstream
2016-08-27 18:41:58 -05:00
Aikar 323c18dd65 Timings v2: confirm before reset. Add delays before report generation
Require user to confirm the timings reset, warning them that they should not be doing this.
Also require Timings to have ran for 3 minutes before allowing the report command.
Also require 1 minute intervals between reports to stop report spam.
2016-08-19 23:42:38 -04:00
Zach Brown 17c9d7d9da
Kick git and rebuild patches 2016-08-15 19:22:10 -05:00
Zach Brown 46bfd418a8
Update upstream B/CB/S 2016-07-30 18:02:34 -05:00
Aikar 106787f894 Timings v2 cleanups - potential overflow fix and fix bad hostnames
if hostname is invalid on system, just use a static string

also cleans up visibility of a lot of code, hopefully will help jvm optimize more.
2016-06-30 01:32:00 -04:00
Zach Brown 83472d4c99
Update upstream B/CB/S 2016-06-26 14:13:34 -05:00
Zach Brown 14ffaf5d2c
Update upstream B/CB 2016-06-11 22:22:27 -05:00
Aikar 433489ea32 Timings v2: Start methods return self for use in try-with-resources
try (Timing ignored = timing) {
  // Code to time
}
// auto stops timing, even if you return in 42 other places in the block
2016-05-15 17:34:26 -04:00
Zach Brown 2304826f19
Move bad command registration workaround into SMP#dispatch
Fixes GH-274
2016-05-13 00:13:42 -05:00
Aikar 776e0784af Try to determine plugin name on bad plugin command registration 2016-04-30 12:53:20 -04:00
Zach Brown 5f98ec08a5
Timings v2: Plugins don't always register commands properly
*mumbles*
2016-04-30 00:09:29 -05:00
Zach Brown ef3f6a481a
Update upstreams 2016-04-11 10:30:12 -05:00