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