{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/44","repository_url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin","labels_url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/44/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/44/events","html_url":"https://github.com/FasterXML/jackson-module-kotlin/issues/44","id":185004766,"number":44,"title":"Cache reflection results.","user":{"login":"MicahZoltu","id":886059,"avatar_url":"https://avatars.githubusercontent.com/u/886059?v=3","gravatar_id":"","url":"https://api.github.com/users/MicahZoltu","html_url":"https://github.com/MicahZoltu","followers_url":"https://api.github.com/users/MicahZoltu/followers","following_url":"https://api.github.com/users/MicahZoltu/following{/other_user}","gists_url":"https://api.github.com/users/MicahZoltu/gists{/gist_id}","starred_url":"https://api.github.com/users/MicahZoltu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicahZoltu/subscriptions","organizations_url":"https://api.github.com/users/MicahZoltu/orgs","repos_url":"https://api.github.com/users/MicahZoltu/repos","events_url":"https://api.github.com/users/MicahZoltu/events{/privacy}","received_events_url":"https://api.github.com/users/MicahZoltu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-10-25T02:42:52Z","updated_at":"2016-10-25T16:48:47Z","closed_at":null,"body":"I am using this in a high-throughput multi-threaded service and my service is spending almost all of its time waiting on lock on the class loader because every time an object is deserialized, it does reflection on the object being deserialized into.  It appears that this is a lock on the classloader deep in the bowels of the Kotlin reflection code.\r\n\r\nReflection is not a fast process, and involves global locks in some cases (such as this one) so the result of the reflection should be cached in a way that allows for multi-threaded reads of the cached object.  We have exactly one object that is deserialized into in our entire process, so using reflection every time to figure out what the object looks like is hugely wasteful and expensive."},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/comments/256092546","html_url":"https://github.com/FasterXML/jackson-module-kotlin/issues/44#issuecomment-256092546","issue_url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/44","id":256092546,"user":{"login":"apatrida","id":182340,"avatar_url":"https://avatars.githubusercontent.com/u/182340?v=3","gravatar_id":"","url":"https://api.github.com/users/apatrida","html_url":"https://github.com/apatrida","followers_url":"https://api.github.com/users/apatrida/followers","following_url":"https://api.github.com/users/apatrida/following{/other_user}","gists_url":"https://api.github.com/users/apatrida/gists{/gist_id}","starred_url":"https://api.github.com/users/apatrida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apatrida/subscriptions","organizations_url":"https://api.github.com/users/apatrida/orgs","repos_url":"https://api.github.com/users/apatrida/repos","events_url":"https://api.github.com/users/apatrida/events{/privacy}","received_events_url":"https://api.github.com/users/apatrida/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T16:48:47Z","updated_at":"2016-10-25T16:48:47Z","body":"great!"}}
{"actor":{"display_login":"apatrida"}}