{"action":"opened","issue":{"url":"https://api.github.com/repos/cglib/cglib/issues/56","labels_url":"https://api.github.com/repos/cglib/cglib/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/cglib/cglib/issues/56/comments","events_url":"https://api.github.com/repos/cglib/cglib/issues/56/events","html_url":"https://github.com/cglib/cglib/issues/56","id":116935919,"number":56,"title":"Avoid reflection in setCallbacksHelper","user":{"login":"vlsi","id":213894,"avatar_url":"https://avatars.githubusercontent.com/u/213894?v=3","gravatar_id":"","url":"https://api.github.com/users/vlsi","html_url":"https://github.com/vlsi","followers_url":"https://api.github.com/users/vlsi/followers","following_url":"https://api.github.com/users/vlsi/following{/other_user}","gists_url":"https://api.github.com/users/vlsi/gists{/gist_id}","starred_url":"https://api.github.com/users/vlsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlsi/subscriptions","organizations_url":"https://api.github.com/users/vlsi/orgs","repos_url":"https://api.github.com/users/vlsi/repos","events_url":"https://api.github.com/users/vlsi/events{/privacy}","received_events_url":"https://api.github.com/users/vlsi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-14T16:26:06Z","updated_at":"2015-11-14T16:26:06Z","closed_at":null,"body":"Under concurrent load lots of threads end up with the following stacktrace.\r\n\r\nIt looks like using a simple interface for CGLIB$SET_THREAD_CALLBACKS, etc, etc would improve performance/scalability.\r\n\r\n```\r\n\"cglib.BeansBenchmark.newInstance-jmh-worker-1\" #11 daemon prio=5 os_prio=31 tid=0x00007fd814112000 nid=0x5a03 runnable [0x00007000017de000]\r\n   java.lang.Thread.State: RUNNABLE\r\n\tat java.lang.String.intern(Native Method)\r\n\tat java.lang.Class.searchMethods(Class.java:3003)\r\n\tat java.lang.Class.getDeclaredMethod(Class.java:2128)\r\n\tat net.sf.cglib.proxy.Enhancer.getCallbacksSetter(Enhancer.java:639)\r\n\tat net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:627)\r\n\tat net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:621)\r\n\tat net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:643)\r\n\tat net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:547)\r\n\tat net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:254)\r\n\tat net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:376)\r\n\tat net.sf.cglib.proxy.Enhancer.create(Enhancer.java:284)\r\n\tat net.sf.cglib.samples.Beans.newInstance(Beans.java:33)\r\n\tat cglib.BeansBenchmark.newInstance(BeansBenchmark.java:23)\r\n\tat cglib.generated.BeansBenchmark_newInstance_jmhTest.newInstance_avgt_jmhStub(BeansBenchmark_newInstance_jmhTest.java:163)\r\n\tat cglib.generated.BeansBenchmark_newInstance_jmhTest.newInstance_AverageTime(BeansBenchmark_newInstance_jmhTest.java:128)\r\n\tat sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:497)\r\n\tat org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:430)\r\n\tat org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:412)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```"}}