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 d97890f63015395b9fcf7bc382686ddfe5f3e266 Mon Sep 17 00:00:00 2001
|
||||
From c6ffdd4bda7232c5e22d96bc0c5e6f6a9c995401 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 May 2016 23:55:48 -0400
|
||||
Subject: [PATCH] ensureServerConversions API
|
||||
|
@ -61,5 +61,5 @@ index 188ae6d7..6bb19b9d 100644
|
|||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.13.3
|
||||
2.14.1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue