{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-dataformat-xml/issues/323","repository_url":"https://api.github.com/repos/FasterXML/jackson-dataformat-xml","labels_url":"https://api.github.com/repos/FasterXML/jackson-dataformat-xml/issues/323/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-dataformat-xml/issues/323/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-dataformat-xml/issues/323/events","html_url":"https://github.com/FasterXML/jackson-dataformat-xml/pull/323","id":382647353,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyMzA0MzUx","number":323,"title":"Replaced slow string concatenation with faster StringBuilder","user":{"login":"ujay68","id":3627476,"node_id":"MDQ6VXNlcjM2Mjc0NzY=","avatar_url":"https://avatars1.githubusercontent.com/u/3627476?v=4","gravatar_id":"","url":"https://api.github.com/users/ujay68","html_url":"https://github.com/ujay68","followers_url":"https://api.github.com/users/ujay68/followers","following_url":"https://api.github.com/users/ujay68/following{/other_user}","gists_url":"https://api.github.com/users/ujay68/gists{/gist_id}","starred_url":"https://api.github.com/users/ujay68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ujay68/subscriptions","organizations_url":"https://api.github.com/users/ujay68/orgs","repos_url":"https://api.github.com/users/ujay68/repos","events_url":"https://api.github.com/users/ujay68/events{/privacy}","received_events_url":"https://api.github.com/users/ujay68/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-20T12:45:53Z","updated_at":"2018-11-20T23:10:30Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/FasterXML/jackson-dataformat-xml/pulls/323","html_url":"https://github.com/FasterXML/jackson-dataformat-xml/pull/323","diff_url":"https://github.com/FasterXML/jackson-dataformat-xml/pull/323.diff","patch_url":"https://github.com/FasterXML/jackson-dataformat-xml/pull/323.patch"},"body":"I found that small change to make a huge performance difference in some scenarios. In one case of processing a sample XML file of about 4 MB into POJOs, the CPU time sank by a factor of 100, from around 5–10 seconds to a few tens of milliseconds on a recent MacBook Pro with Azul OpenJDK 8."},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-dataformat-xml/issues/comments/440462122","html_url":"https://github.com/FasterXML/jackson-dataformat-xml/pull/323#issuecomment-440462122","issue_url":"https://api.github.com/repos/FasterXML/jackson-dataformat-xml/issues/323","id":440462122,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDQ2MjEyMg==","user":{"login":"ujay68","id":3627476,"node_id":"MDQ6VXNlcjM2Mjc0NzY=","avatar_url":"https://avatars1.githubusercontent.com/u/3627476?v=4","gravatar_id":"","url":"https://api.github.com/users/ujay68","html_url":"https://github.com/ujay68","followers_url":"https://api.github.com/users/ujay68/followers","following_url":"https://api.github.com/users/ujay68/following{/other_user}","gists_url":"https://api.github.com/users/ujay68/gists{/gist_id}","starred_url":"https://api.github.com/users/ujay68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ujay68/subscriptions","organizations_url":"https://api.github.com/users/ujay68/orgs","repos_url":"https://api.github.com/users/ujay68/repos","events_url":"https://api.github.com/users/ujay68/events{/privacy}","received_events_url":"https://api.github.com/users/ujay68/received_events","type":"User","site_admin":false},"created_at":"2018-11-20T23:10:30Z","updated_at":"2018-11-20T23:10:30Z","author_association":"NONE","body":"Thanks for considering. Your point could be true, of course, even if current JVMs are very good at handling short-lived objects. As a suggestion, I've just pushed a second commit where the StringBuilder is not allocated until a second string segment needs to be appended. This keeps the magnitude of the initial optimization. In the simple case of only one string segment, it adds the (probably negligible) overhead of a single `.toString()` call to a `CharSequence` object that already is a `String`. Better this way?"}}
{"actor":{"display_login":"ujay68"}}