{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/FirebirdSQL/jaybird/pulls/1","id":36498921,"html_url":"https://github.com/FirebirdSQL/jaybird/pull/1","diff_url":"https://github.com/FirebirdSQL/jaybird/pull/1.diff","patch_url":"https://github.com/FirebirdSQL/jaybird/pull/1.patch","issue_url":"https://api.github.com/repos/FirebirdSQL/jaybird/issues/1","number":1,"state":"open","locked":false,"title":"Moved auto-commit logic from Jaybird to the Firebird.","user":{"login":"Smyatkin-Maxim","id":1557439,"avatar_url":"https://avatars.githubusercontent.com/u/1557439?v=3","gravatar_id":"","url":"https://api.github.com/users/Smyatkin-Maxim","html_url":"https://github.com/Smyatkin-Maxim","followers_url":"https://api.github.com/users/Smyatkin-Maxim/followers","following_url":"https://api.github.com/users/Smyatkin-Maxim/following{/other_user}","gists_url":"https://api.github.com/users/Smyatkin-Maxim/gists{/gist_id}","starred_url":"https://api.github.com/users/Smyatkin-Maxim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Smyatkin-Maxim/subscriptions","organizations_url":"https://api.github.com/users/Smyatkin-Maxim/orgs","repos_url":"https://api.github.com/users/Smyatkin-Maxim/repos","events_url":"https://api.github.com/users/Smyatkin-Maxim/events{/privacy}","received_events_url":"https://api.github.com/users/Smyatkin-Maxim/received_events","type":"User","site_admin":false},"body":"Jaybird shows horrible performance in auto-commit mode while executing\r\nlots of small queries.\r\nReasons:\r\n1. Every time a statement is being executed a new transaction starts and\r\ncommits.\r\n2. Even if there were no changes at all (e.g., simple select statement)\r\nJaybird starts and commits transaction.\r\n\r\nSolution: Firebird API has its own auto-commit flag. Firebird knows for\r\nsure if anything did actually change, so Jaybird might rely on it. As a\r\nresult:\r\n1. It saves start and commit calls;\r\n2. It executes commits only if something really changed;\r\n3. Internally it works faster even if changes appeared because it doesn't\r\nrestart a transaction.\r\nPractical results: it allowed me to make OpenCMS work 3-5 times faster\r\nwith Firebird. I suppose it's not the only case, because some systems\r\n(especially the ones using ORMs) tend to execute lots of small selects.\r\n\r\nMain changes in code are:\r\n1. Removed AutocommitTransactionCoordinator. LocalTransactionCoordinator\r\nwith enabled autoCommit flag does exactly what we need.\r\n2. When we change autoCoommit to true/false - we commit previous\r\ntransaction manually, so that it restarts with new TPB.","created_at":"2015-05-29T12:06:34Z","updated_at":"2015-05-29T12:06:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FirebirdSQL/jaybird/pulls/1/commits","review_comments_url":"https://api.github.com/repos/FirebirdSQL/jaybird/pulls/1/comments","review_comment_url":"https://api.github.com/repos/FirebirdSQL/jaybird/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FirebirdSQL/jaybird/issues/1/comments","statuses_url":"https://api.github.com/repos/FirebirdSQL/jaybird/statuses/e3a8091da65777f7fdecc80f948a84d2d4896e67","head":{"label":"Smyatkin-Maxim:Branch_2_2","ref":"Branch_2_2","sha":"e3a8091da65777f7fdecc80f948a84d2d4896e67","user":{"login":"Smyatkin-Maxim","id":1557439,"avatar_url":"https://avatars.githubusercontent.com/u/1557439?v=3","gravatar_id":"","url":"https://api.github.com/users/Smyatkin-Maxim","html_url":"https://github.com/Smyatkin-Maxim","followers_url":"https://api.github.com/users/Smyatkin-Maxim/followers","following_url":"https://api.github.com/users/Smyatkin-Maxim/following{/other_user}","gists_url":"https://api.github.com/users/Smyatkin-Maxim/gists{/gist_id}","starred_url":"https://api.github.com/users/Smyatkin-Maxim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Smyatkin-Maxim/subscriptions","organizations_url":"https://api.github.com/users/Smyatkin-Maxim/orgs","repos_url":"https://api.github.com/users/Smyatkin-Maxim/repos","events_url":"https://api.github.com/users/Smyatkin-Maxim/events{/privacy}","received_events_url":"https://api.github.com/users/Smyatkin-Maxim/received_events","type":"User","site_admin":false},"repo":{"id":36235049,"name":"jaybird","full_name":"Smyatkin-Maxim/jaybird","owner":{"login":"Smyatkin-Maxim","id":1557439,"avatar_url":"https://avatars.githubusercontent.com/u/1557439?v=3","gravatar_id":"","url":"https://api.github.com/users/Smyatkin-Maxim","html_url":"https://github.com/Smyatkin-Maxim","followers_url":"https://api.github.com/users/Smyatkin-Maxim/followers","following_url":"https://api.github.com/users/Smyatkin-Maxim/following{/other_user}","gists_url":"https://api.github.com/users/Smyatkin-Maxim/gists{/gist_id}","starred_url":"https://api.github.com/users/Smyatkin-Maxim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Smyatkin-Maxim/subscriptions","organizations_url":"https://api.github.com/users/Smyatkin-Maxim/orgs","repos_url":"https://api.github.com/users/Smyatkin-Maxim/repos","events_url":"https://api.github.com/users/Smyatkin-Maxim/events{/privacy}","received_events_url":"https://api.github.com/users/Smyatkin-Maxim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Smyatkin-Maxim/jaybird","description":"JCA/JDBC driver for Firebird","fork":true,"url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird","forks_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/forks","keys_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/teams","hooks_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/hooks","issue_events_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/issues/events{/number}","events_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/events","assignees_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/assignees{/user}","branches_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/branches{/branch}","tags_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/tags","blobs_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/git/refs{/sha}","trees_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/statuses/{sha}","languages_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/languages","stargazers_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/stargazers","contributors_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/contributors","subscribers_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/subscribers","subscription_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/subscription","commits_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/commits{/sha}","git_commits_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/git/commits{/sha}","comments_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/comments{/number}","issue_comment_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/issues/comments{/number}","contents_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/contents/{+path}","compare_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/merges","archive_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/downloads","issues_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/issues{/number}","pulls_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/pulls{/number}","milestones_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/milestones{/number}","notifications_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/labels{/name}","releases_url":"https://api.github.com/repos/Smyatkin-Maxim/jaybird/releases{/id}","created_at":"2015-05-25T14:16:34Z","updated_at":"2015-05-25T14:16:42Z","pushed_at":"2015-05-29T12:04:56Z","git_url":"git://github.com/Smyatkin-Maxim/jaybird.git","ssh_url":"git@github.com:Smyatkin-Maxim/jaybird.git","clone_url":"https://github.com/Smyatkin-Maxim/jaybird.git","svn_url":"https://github.com/Smyatkin-Maxim/jaybird","homepage":"http://www.firebirdsql.org/en/jdbc-driver/","size":63152,"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":"FirebirdSQL:Branch_2_2","ref":"Branch_2_2","sha":"ba88c5f1841c19462bf5ec49ee39ded197b1bb15","user":{"login":"FirebirdSQL","id":6057940,"avatar_url":"https://avatars.githubusercontent.com/u/6057940?v=3","gravatar_id":"","url":"https://api.github.com/users/FirebirdSQL","html_url":"https://github.com/FirebirdSQL","followers_url":"https://api.github.com/users/FirebirdSQL/followers","following_url":"https://api.github.com/users/FirebirdSQL/following{/other_user}","gists_url":"https://api.github.com/users/FirebirdSQL/gists{/gist_id}","starred_url":"https://api.github.com/users/FirebirdSQL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FirebirdSQL/subscriptions","organizations_url":"https://api.github.com/users/FirebirdSQL/orgs","repos_url":"https://api.github.com/users/FirebirdSQL/repos","events_url":"https://api.github.com/users/FirebirdSQL/events{/privacy}","received_events_url":"https://api.github.com/users/FirebirdSQL/received_events","type":"Organization","site_admin":false},"repo":{"id":34562183,"name":"jaybird","full_name":"FirebirdSQL/jaybird","owner":{"login":"FirebirdSQL","id":6057940,"avatar_url":"https://avatars.githubusercontent.com/u/6057940?v=3","gravatar_id":"","url":"https://api.github.com/users/FirebirdSQL","html_url":"https://github.com/FirebirdSQL","followers_url":"https://api.github.com/users/FirebirdSQL/followers","following_url":"https://api.github.com/users/FirebirdSQL/following{/other_user}","gists_url":"https://api.github.com/users/FirebirdSQL/gists{/gist_id}","starred_url":"https://api.github.com/users/FirebirdSQL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FirebirdSQL/subscriptions","organizations_url":"https://api.github.com/users/FirebirdSQL/orgs","repos_url":"https://api.github.com/users/FirebirdSQL/repos","events_url":"https://api.github.com/users/FirebirdSQL/events{/privacy}","received_events_url":"https://api.github.com/users/FirebirdSQL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FirebirdSQL/jaybird","description":"JCA/JDBC driver for Firebird","fork":false,"url":"https://api.github.com/repos/FirebirdSQL/jaybird","forks_url":"https://api.github.com/repos/FirebirdSQL/jaybird/forks","keys_url":"https://api.github.com/repos/FirebirdSQL/jaybird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FirebirdSQL/jaybird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FirebirdSQL/jaybird/teams","hooks_url":"https://api.github.com/repos/FirebirdSQL/jaybird/hooks","issue_events_url":"https://api.github.com/repos/FirebirdSQL/jaybird/issues/events{/number}","events_url":"https://api.github.com/repos/FirebirdSQL/jaybird/events","assignees_url":"https://api.github.com/repos/FirebirdSQL/jaybird/assignees{/user}","branches_url":"https://api.github.com/repos/FirebirdSQL/jaybird/branches{/branch}","tags_url":"https://api.github.com/repos/FirebirdSQL/jaybird/tags","blobs_url":"https://api.github.com/repos/FirebirdSQL/jaybird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FirebirdSQL/jaybird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FirebirdSQL/jaybird/git/refs{/sha}","trees_url":"https://api.github.com/repos/FirebirdSQL/jaybird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FirebirdSQL/jaybird/statuses/{sha}","languages_url":"https://api.github.com/repos/FirebirdSQL/jaybird/languages","stargazers_url":"https://api.github.com/repos/FirebirdSQL/jaybird/stargazers","contributors_url":"https://api.github.com/repos/FirebirdSQL/jaybird/contributors","subscribers_url":"https://api.github.com/repos/FirebirdSQL/jaybird/subscribers","subscription_url":"https://api.github.com/repos/FirebirdSQL/jaybird/subscription","commits_url":"https://api.github.com/repos/FirebirdSQL/jaybird/commits{/sha}","git_commits_url":"https://api.github.com/repos/FirebirdSQL/jaybird/git/commits{/sha}","comments_url":"https://api.github.com/repos/FirebirdSQL/jaybird/comments{/number}","issue_comment_url":"https://api.github.com/repos/FirebirdSQL/jaybird/issues/comments{/number}","contents_url":"https://api.github.com/repos/FirebirdSQL/jaybird/contents/{+path}","compare_url":"https://api.github.com/repos/FirebirdSQL/jaybird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FirebirdSQL/jaybird/merges","archive_url":"https://api.github.com/repos/FirebirdSQL/jaybird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FirebirdSQL/jaybird/downloads","issues_url":"https://api.github.com/repos/FirebirdSQL/jaybird/issues{/number}","pulls_url":"https://api.github.com/repos/FirebirdSQL/jaybird/pulls{/number}","milestones_url":"https://api.github.com/repos/FirebirdSQL/jaybird/milestones{/number}","notifications_url":"https://api.github.com/repos/FirebirdSQL/jaybird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FirebirdSQL/jaybird/labels{/name}","releases_url":"https://api.github.com/repos/FirebirdSQL/jaybird/releases{/id}","created_at":"2015-04-25T09:06:11Z","updated_at":"2015-05-07T08:13:14Z","pushed_at":"2015-05-29T12:06:34Z","git_url":"git://github.com/FirebirdSQL/jaybird.git","ssh_url":"git@github.com:FirebirdSQL/jaybird.git","clone_url":"https://github.com/FirebirdSQL/jaybird.git","svn_url":"https://github.com/FirebirdSQL/jaybird","homepage":"http://www.firebirdsql.org/en/jdbc-driver/","size":63152,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FirebirdSQL/jaybird/pulls/1"},"html":{"href":"https://github.com/FirebirdSQL/jaybird/pull/1"},"issue":{"href":"https://api.github.com/repos/FirebirdSQL/jaybird/issues/1"},"comments":{"href":"https://api.github.com/repos/FirebirdSQL/jaybird/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/FirebirdSQL/jaybird/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/FirebirdSQL/jaybird/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FirebirdSQL/jaybird/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/FirebirdSQL/jaybird/statuses/e3a8091da65777f7fdecc80f948a84d2d4896e67"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":124,"deletions":191,"changed_files":7}}