{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/rdf4j/pulls/comments/79070303","id":79070303,"diff_hunk":"@@ -0,0 +1,30 @@\n+package org.eclipse.rdf4j.rio.turtle;\n+\n+/**\n+ * Utilities that were taken from the Character but changed to be better suited for parsing\n+ * without additional garbage.\n+ * @author Nikola Petrov nikola.petrov@ontotext.com\n+ */\n+class Chars {\n+\t/**\n+\t * Appends the characters from codepoint into the string builder. This is the same\n+\t * as Character#toChars but prevents the additional char array garbage.\n+\t * @param dst the destination in which to append the characters\n+\t * @param codePoint the codepoint to be appended\n+\t */\n+\tpublic static void append(StringBuilder dst, int codePoint) {","path":"core/rio/turtle/src/main/java/org/eclipse/rdf4j/rio/turtle/Chars.java","position":null,"original_position":15,"commit_id":"3da2dbf1a8aed9f2b627b7498dd0dbef43f0fa46","original_commit_id":"040da1aa4829baf872fd7f5314a7e4f7b5aabff3","user":{"login":"jeenbroekstra","id":728776,"avatar_url":"https://avatars.githubusercontent.com/u/728776?v=3","gravatar_id":"","url":"https://api.github.com/users/jeenbroekstra","html_url":"https://github.com/jeenbroekstra","followers_url":"https://api.github.com/users/jeenbroekstra/followers","following_url":"https://api.github.com/users/jeenbroekstra/following{/other_user}","gists_url":"https://api.github.com/users/jeenbroekstra/gists{/gist_id}","starred_url":"https://api.github.com/users/jeenbroekstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeenbroekstra/subscriptions","organizations_url":"https://api.github.com/users/jeenbroekstra/orgs","repos_url":"https://api.github.com/users/jeenbroekstra/repos","events_url":"https://api.github.com/users/jeenbroekstra/events{/privacy}","received_events_url":"https://api.github.com/users/jeenbroekstra/received_events","type":"User","site_admin":false},"body":"Unfortunately, it is not quite that simple. OpenJDK source code is licensed under GPL, which means we can't reuse it in our own code (unless we then distribute the entire RDF4J framework under GPL license as well - which is not something we want to do :)).\r\n\r\nGiven that this is such a small code snippet though, and a really quite basic algorithm, I'll doublecheck with the Eclipse legal team if we can get away with this somehow. ","created_at":"2016-09-15T21:53:09Z","updated_at":"2016-09-15T21:53:10Z","html_url":"https://github.com/eclipse/rdf4j/pull/571#discussion_r79070303","pull_request_url":"https://api.github.com/repos/eclipse/rdf4j/pulls/571","_links":{"self":{"href":"https://api.github.com/repos/eclipse/rdf4j/pulls/comments/79070303"},"html":{"href":"https://github.com/eclipse/rdf4j/pull/571#discussion_r79070303"},"pull_request":{"href":"https://api.github.com/repos/eclipse/rdf4j/pulls/571"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/rdf4j/pulls/571","id":85224599,"html_url":"https://github.com/eclipse/rdf4j/pull/571","diff_url":"https://github.com/eclipse/rdf4j/pull/571.diff","patch_url":"https://github.com/eclipse/rdf4j/pull/571.patch","issue_url":"https://api.github.com/repos/eclipse/rdf4j/issues/571","number":571,"state":"open","locked":false,"title":"Improve the performance and create less garbage in the turtle parser","user":{"login":"nikolavp","id":288612,"avatar_url":"https://avatars.githubusercontent.com/u/288612?v=3","gravatar_id":"","url":"https://api.github.com/users/nikolavp","html_url":"https://github.com/nikolavp","followers_url":"https://api.github.com/users/nikolavp/followers","following_url":"https://api.github.com/users/nikolavp/following{/other_user}","gists_url":"https://api.github.com/users/nikolavp/gists{/gist_id}","starred_url":"https://api.github.com/users/nikolavp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikolavp/subscriptions","organizations_url":"https://api.github.com/users/nikolavp/orgs","repos_url":"https://api.github.com/users/nikolavp/repos","events_url":"https://api.github.com/users/nikolavp/events{/privacy}","received_events_url":"https://api.github.com/users/nikolavp/received_events","type":"User","site_admin":false},"body":"This pull request will hopefully make the turtle parser a little bit faster and prevent a lot of memory allocations when parsing reasonably turtle files. The pull request contains two major changes:\r\n\r\nReusing the string builder instead of creating a new one - this is good for memory usage and also prevents resizing throughout the parsing\r\nCharacter.toChars is creating a char array which is not actually needed. We can easily just reuse the code from there and append the result into the string builder\r\n\r\nIssue that describes how we found about the problem https://github.com/eclipse/rdf4j/issues/572","created_at":"2016-09-14T13:11:02Z","updated_at":"2016-09-15T21:53:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05ceaa54d08a11f75bf502d43ef244491481a439","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/rdf4j/pulls/571/commits","review_comments_url":"https://api.github.com/repos/eclipse/rdf4j/pulls/571/comments","review_comment_url":"https://api.github.com/repos/eclipse/rdf4j/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/rdf4j/issues/571/comments","statuses_url":"https://api.github.com/repos/eclipse/rdf4j/statuses/3da2dbf1a8aed9f2b627b7498dd0dbef43f0fa46","head":{"label":"nikolavp:turtle-parser-less-garbage","ref":"turtle-parser-less-garbage","sha":"3da2dbf1a8aed9f2b627b7498dd0dbef43f0fa46","user":{"login":"nikolavp","id":288612,"avatar_url":"https://avatars.githubusercontent.com/u/288612?v=3","gravatar_id":"","url":"https://api.github.com/users/nikolavp","html_url":"https://github.com/nikolavp","followers_url":"https://api.github.com/users/nikolavp/followers","following_url":"https://api.github.com/users/nikolavp/following{/other_user}","gists_url":"https://api.github.com/users/nikolavp/gists{/gist_id}","starred_url":"https://api.github.com/users/nikolavp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikolavp/subscriptions","organizations_url":"https://api.github.com/users/nikolavp/orgs","repos_url":"https://api.github.com/users/nikolavp/repos","events_url":"https://api.github.com/users/nikolavp/events{/privacy}","received_events_url":"https://api.github.com/users/nikolavp/received_events","type":"User","site_admin":false},"repo":{"id":68205054,"name":"rdf4j","full_name":"nikolavp/rdf4j","owner":{"login":"nikolavp","id":288612,"avatar_url":"https://avatars.githubusercontent.com/u/288612?v=3","gravatar_id":"","url":"https://api.github.com/users/nikolavp","html_url":"https://github.com/nikolavp","followers_url":"https://api.github.com/users/nikolavp/followers","following_url":"https://api.github.com/users/nikolavp/following{/other_user}","gists_url":"https://api.github.com/users/nikolavp/gists{/gist_id}","starred_url":"https://api.github.com/users/nikolavp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikolavp/subscriptions","organizations_url":"https://api.github.com/users/nikolavp/orgs","repos_url":"https://api.github.com/users/nikolavp/repos","events_url":"https://api.github.com/users/nikolavp/events{/privacy}","received_events_url":"https://api.github.com/users/nikolavp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nikolavp/rdf4j","description":"RDF4J Project","fork":true,"url":"https://api.github.com/repos/nikolavp/rdf4j","forks_url":"https://api.github.com/repos/nikolavp/rdf4j/forks","keys_url":"https://api.github.com/repos/nikolavp/rdf4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nikolavp/rdf4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nikolavp/rdf4j/teams","hooks_url":"https://api.github.com/repos/nikolavp/rdf4j/hooks","issue_events_url":"https://api.github.com/repos/nikolavp/rdf4j/issues/events{/number}","events_url":"https://api.github.com/repos/nikolavp/rdf4j/events","assignees_url":"https://api.github.com/repos/nikolavp/rdf4j/assignees{/user}","branches_url":"https://api.github.com/repos/nikolavp/rdf4j/branches{/branch}","tags_url":"https://api.github.com/repos/nikolavp/rdf4j/tags","blobs_url":"https://api.github.com/repos/nikolavp/rdf4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nikolavp/rdf4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nikolavp/rdf4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/nikolavp/rdf4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nikolavp/rdf4j/statuses/{sha}","languages_url":"https://api.github.com/repos/nikolavp/rdf4j/languages","stargazers_url":"https://api.github.com/repos/nikolavp/rdf4j/stargazers","contributors_url":"https://api.github.com/repos/nikolavp/rdf4j/contributors","subscribers_url":"https://api.github.com/repos/nikolavp/rdf4j/subscribers","subscription_url":"https://api.github.com/repos/nikolavp/rdf4j/subscription","commits_url":"https://api.github.com/repos/nikolavp/rdf4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/nikolavp/rdf4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/nikolavp/rdf4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/nikolavp/rdf4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/nikolavp/rdf4j/contents/{+path}","compare_url":"https://api.github.com/repos/nikolavp/rdf4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nikolavp/rdf4j/merges","archive_url":"https://api.github.com/repos/nikolavp/rdf4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nikolavp/rdf4j/downloads","issues_url":"https://api.github.com/repos/nikolavp/rdf4j/issues{/number}","pulls_url":"https://api.github.com/repos/nikolavp/rdf4j/pulls{/number}","milestones_url":"https://api.github.com/repos/nikolavp/rdf4j/milestones{/number}","notifications_url":"https://api.github.com/repos/nikolavp/rdf4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nikolavp/rdf4j/labels{/name}","releases_url":"https://api.github.com/repos/nikolavp/rdf4j/releases{/id}","deployments_url":"https://api.github.com/repos/nikolavp/rdf4j/deployments","created_at":"2016-09-14T12:38:12Z","updated_at":"2016-09-14T12:38:23Z","pushed_at":"2016-09-15T12:29:08Z","git_url":"git://github.com/nikolavp/rdf4j.git","ssh_url":"git@github.com:nikolavp/rdf4j.git","clone_url":"https://github.com/nikolavp/rdf4j.git","svn_url":"https://github.com/nikolavp/rdf4j","homepage":null,"size":9408,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"68f4d42d942a979e87274495a1582f2921dc86a8","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":49670957,"name":"rdf4j","full_name":"eclipse/rdf4j","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/rdf4j","description":"RDF4J Project","fork":false,"url":"https://api.github.com/repos/eclipse/rdf4j","forks_url":"https://api.github.com/repos/eclipse/rdf4j/forks","keys_url":"https://api.github.com/repos/eclipse/rdf4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/rdf4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/rdf4j/teams","hooks_url":"https://api.github.com/repos/eclipse/rdf4j/hooks","issue_events_url":"https://api.github.com/repos/eclipse/rdf4j/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/rdf4j/events","assignees_url":"https://api.github.com/repos/eclipse/rdf4j/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/rdf4j/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/rdf4j/tags","blobs_url":"https://api.github.com/repos/eclipse/rdf4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/rdf4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/rdf4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/rdf4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/rdf4j/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/rdf4j/languages","stargazers_url":"https://api.github.com/repos/eclipse/rdf4j/stargazers","contributors_url":"https://api.github.com/repos/eclipse/rdf4j/contributors","subscribers_url":"https://api.github.com/repos/eclipse/rdf4j/subscribers","subscription_url":"https://api.github.com/repos/eclipse/rdf4j/subscription","commits_url":"https://api.github.com/repos/eclipse/rdf4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/rdf4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/rdf4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/rdf4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/rdf4j/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/rdf4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/rdf4j/merges","archive_url":"https://api.github.com/repos/eclipse/rdf4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/rdf4j/downloads","issues_url":"https://api.github.com/repos/eclipse/rdf4j/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/rdf4j/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/rdf4j/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/rdf4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/rdf4j/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/rdf4j/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/rdf4j/deployments","created_at":"2016-01-14T19:47:32Z","updated_at":"2016-09-15T11:05:53Z","pushed_at":"2016-09-15T12:29:08Z","git_url":"git://github.com/eclipse/rdf4j.git","ssh_url":"git@github.com:eclipse/rdf4j.git","clone_url":"https://github.com/eclipse/rdf4j.git","svn_url":"https://github.com/eclipse/rdf4j","homepage":null,"size":9587,"stargazers_count":35,"watchers_count":35,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":281,"forks":16,"open_issues":281,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/rdf4j/pulls/571"},"html":{"href":"https://github.com/eclipse/rdf4j/pull/571"},"issue":{"href":"https://api.github.com/repos/eclipse/rdf4j/issues/571"},"comments":{"href":"https://api.github.com/repos/eclipse/rdf4j/issues/571/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/rdf4j/pulls/571/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/rdf4j/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/rdf4j/pulls/571/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/rdf4j/statuses/3da2dbf1a8aed9f2b627b7498dd0dbef43f0fa46"}}}}
{"actor":{"display_login":"jeenbroekstra"}}