Cache generated EventExecutors (fixes #786)
the first 'major' change in this PR is to cache the generated event executrs from the ASM class, by doing this we only generate a single class for every method that we need an executor for, thus reducing the number of classes that are needed, especially in cases where plugins re/unregister events all the time. The second change is to modify the generated classloader map, generated classloaders are not held against the plugin itself but the classloader that the event is declared in, the implication here is that we cannot drop generated classloaders when a plugin disable, and so we use a guava weak-key'd hashmap, downfall here is that classes won't be GC'd until guava drops the generated classloader, however the first change should deal with most of the grunt.
This commit is contained in:
parent
6d9375d222
commit
9c79dd3214
11 changed files with 58 additions and 31 deletions
|
@ -1,4 +1,4 @@
|
|||
From c814474d6c5d9c4d7142d141e6dabf3935a577cb Mon Sep 17 00:00:00 2001
|
||||
From 225e4e635f54b9f4ba440a4a849a4bddde5c6309 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 3 Jul 2017 18:11:34 -0500
|
||||
Subject: [PATCH] ProfileWhitelistVerifyEvent
|
||||
|
@ -124,5 +124,5 @@ index 00000000..59b69b23
|
|||
+ }
|
||||
+}
|
||||
--
|
||||
2.13.3
|
||||
2.14.1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue