{"action":"created","comment":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/33297282","id":33297282,"diff_hunk":"@@ -270,76 +264,114 @@ bool Dataset::goto_rec(int pos) {\n   return false;\n }\n \n-\n void Dataset::insert() {\n-   edit_object->resize(field_count());\n-   for (int i=0; i<field_count(); i++) {\n-     (*fields_object)[i].val = \"\";\n-     (*edit_object)[i].val = \"\";\n-     (*edit_object)[i].props = (*fields_object)[i].props;\n-   }\n+  edit_object->resize(field_count());\n+  for (int i=0; i<field_count(); i++) {\n+    (*fields_object)[i].val = \"\";\n+    (*edit_object)[i].val = \"\";\n+    (*edit_object)[i].props = (*fields_object)[i].props;\n+  }\n   ds_state = dsInsert;\n }\n \n-\n void Dataset::edit() {\n   if (ds_state != dsSelect) {\n     throw DbErrors(\"Editing is possible only when query exists!\");\n   }\n   edit_object->resize(field_count());\n   for (unsigned int i=0; i<fields_object->size(); i++) {\n-       (*edit_object)[i].props = (*fields_object)[i].props;\n-       (*edit_object)[i].val = (*fields_object)[i].val; \n+    (*edit_object)[i].props = (*fields_object)[i].props;\n+    (*edit_object)[i].val = (*fields_object)[i].val; \n   }\n   ds_state = dsEdit;\n }\n \n-\n void Dataset::post() {\n-  if (ds_state == dsInsert) make_insert();\n-  else if (ds_state == dsEdit) make_edit();\n+  if (ds_state == dsInsert)\n+    make_insert();\n+  else if (ds_state == dsEdit)\n+    make_edit();\n }\n \n-\n void Dataset::deletion() {\n-  if (ds_state == dsSelect) make_deletion();\n+  if (ds_state == dsSelect)\n+    make_deletion();\n }\n \n-\n bool Dataset::set_field_value(const char *f_name, const field_value &value) {\n   bool found = false;\n   if ((ds_state == dsInsert) || (ds_state == dsEdit)) {\n-      for (unsigned int i=0; i < fields_object->size(); i++) \n-\tif (str_compare((*edit_object)[i].props.name.c_str(), f_name)==0) {\n-\t\t\t     (*edit_object)[i].val = value;\n-\t\t\t     found = true;\n-\t}\n-      if (!found) throw DbErrors(\"Field not found: %s\",f_name);\n+    for (unsigned int i=0; i < fields_object->size(); i++) ","path":"xbmc/dbwrappers/dataset.cpp","position":358,"original_position":358,"commit_id":"1c5eb3e8e54879af7507d7e9d733cd10edec7550","original_commit_id":"1c5eb3e8e54879af7507d7e9d733cd10edec7550","user":{"login":"xhaggi","id":1878991,"avatar_url":"https://avatars.githubusercontent.com/u/1878991?v=3","gravatar_id":"","url":"https://api.github.com/users/xhaggi","html_url":"https://github.com/xhaggi","followers_url":"https://api.github.com/users/xhaggi/followers","following_url":"https://api.github.com/users/xhaggi/following{/other_user}","gists_url":"https://api.github.com/users/xhaggi/gists{/gist_id}","starred_url":"https://api.github.com/users/xhaggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xhaggi/subscriptions","organizations_url":"https://api.github.com/users/xhaggi/orgs","repos_url":"https://api.github.com/users/xhaggi/repos","events_url":"https://api.github.com/users/xhaggi/events{/privacy}","received_events_url":"https://api.github.com/users/xhaggi/received_events","type":"User","site_admin":false},"body":"could you please enclose the for in brackets for better readability","created_at":"2015-06-25T19:53:27Z","updated_at":"2015-06-25T19:53:27Z","html_url":"https://github.com/xbmc/xbmc/pull/7329#discussion_r33297282","pull_request_url":"https://api.github.com/repos/xbmc/xbmc/pulls/7329","_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/33297282"},"html":{"href":"https://github.com/xbmc/xbmc/pull/7329#discussion_r33297282"},"pull_request":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/7329"}}},"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/7329","id":38280819,"html_url":"https://github.com/xbmc/xbmc/pull/7329","diff_url":"https://github.com/xbmc/xbmc/pull/7329.diff","patch_url":"https://github.com/xbmc/xbmc/pull/7329.patch","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/7329","number":7329,"state":"open","locked":false,"title":"[db] optional speedup of ResultQueries using string key reuse","user":{"login":"mapfau","id":12764616,"avatar_url":"https://avatars.githubusercontent.com/u/12764616?v=3","gravatar_id":"","url":"https://api.github.com/users/mapfau","html_url":"https://github.com/mapfau","followers_url":"https://api.github.com/users/mapfau/followers","following_url":"https://api.github.com/users/mapfau/following{/other_user}","gists_url":"https://api.github.com/users/mapfau/gists{/gist_id}","starred_url":"https://api.github.com/users/mapfau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapfau/subscriptions","organizations_url":"https://api.github.com/users/mapfau/orgs","repos_url":"https://api.github.com/users/mapfau/repos","events_url":"https://api.github.com/users/mapfau/events{/privacy}","received_events_url":"https://api.github.com/users/mapfau/received_events","type":"User","site_admin":false},"body":"Reading EPG's from DB improved. On my odroid XU3 its now below the expected 1 second.\r\nDB queries are slow, so instead reading epg's and afterwards retrieving tags for each epg I read all the stuff once.\r\nNegative side effect: loading is to fast for the Progessbar - nothing is readable anymore.\r\nMaybe displaying each channel while loading could be eliminated.","created_at":"2015-06-22T21:53:02Z","updated_at":"2015-06-25T19:53:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a726dd58ab05c715157f96530e1430de5c02f66c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xbmc/xbmc/pulls/7329/commits","review_comments_url":"https://api.github.com/repos/xbmc/xbmc/pulls/7329/comments","review_comment_url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/7329/comments","statuses_url":"https://api.github.com/repos/xbmc/xbmc/statuses/1c5eb3e8e54879af7507d7e9d733cd10edec7550","head":{"label":"mapfau:xbmc_improvements","ref":"xbmc_improvements","sha":"1c5eb3e8e54879af7507d7e9d733cd10edec7550","user":{"login":"mapfau","id":12764616,"avatar_url":"https://avatars.githubusercontent.com/u/12764616?v=3","gravatar_id":"","url":"https://api.github.com/users/mapfau","html_url":"https://github.com/mapfau","followers_url":"https://api.github.com/users/mapfau/followers","following_url":"https://api.github.com/users/mapfau/following{/other_user}","gists_url":"https://api.github.com/users/mapfau/gists{/gist_id}","starred_url":"https://api.github.com/users/mapfau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapfau/subscriptions","organizations_url":"https://api.github.com/users/mapfau/orgs","repos_url":"https://api.github.com/users/mapfau/repos","events_url":"https://api.github.com/users/mapfau/events{/privacy}","received_events_url":"https://api.github.com/users/mapfau/received_events","type":"User","site_admin":false},"repo":{"id":36955169,"name":"xbmc","full_name":"mapfau/xbmc","owner":{"login":"mapfau","id":12764616,"avatar_url":"https://avatars.githubusercontent.com/u/12764616?v=3","gravatar_id":"","url":"https://api.github.com/users/mapfau","html_url":"https://github.com/mapfau","followers_url":"https://api.github.com/users/mapfau/followers","following_url":"https://api.github.com/users/mapfau/following{/other_user}","gists_url":"https://api.github.com/users/mapfau/gists{/gist_id}","starred_url":"https://api.github.com/users/mapfau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapfau/subscriptions","organizations_url":"https://api.github.com/users/mapfau/orgs","repos_url":"https://api.github.com/users/mapfau/repos","events_url":"https://api.github.com/users/mapfau/events{/privacy}","received_events_url":"https://api.github.com/users/mapfau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mapfau/xbmc","description":"ODROID Modifed Kodi (except master)","fork":true,"url":"https://api.github.com/repos/mapfau/xbmc","forks_url":"https://api.github.com/repos/mapfau/xbmc/forks","keys_url":"https://api.github.com/repos/mapfau/xbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapfau/xbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapfau/xbmc/teams","hooks_url":"https://api.github.com/repos/mapfau/xbmc/hooks","issue_events_url":"https://api.github.com/repos/mapfau/xbmc/issues/events{/number}","events_url":"https://api.github.com/repos/mapfau/xbmc/events","assignees_url":"https://api.github.com/repos/mapfau/xbmc/assignees{/user}","branches_url":"https://api.github.com/repos/mapfau/xbmc/branches{/branch}","tags_url":"https://api.github.com/repos/mapfau/xbmc/tags","blobs_url":"https://api.github.com/repos/mapfau/xbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapfau/xbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapfau/xbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapfau/xbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapfau/xbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/mapfau/xbmc/languages","stargazers_url":"https://api.github.com/repos/mapfau/xbmc/stargazers","contributors_url":"https://api.github.com/repos/mapfau/xbmc/contributors","subscribers_url":"https://api.github.com/repos/mapfau/xbmc/subscribers","subscription_url":"https://api.github.com/repos/mapfau/xbmc/subscription","commits_url":"https://api.github.com/repos/mapfau/xbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapfau/xbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapfau/xbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapfau/xbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapfau/xbmc/contents/{+path}","compare_url":"https://api.github.com/repos/mapfau/xbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapfau/xbmc/merges","archive_url":"https://api.github.com/repos/mapfau/xbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapfau/xbmc/downloads","issues_url":"https://api.github.com/repos/mapfau/xbmc/issues{/number}","pulls_url":"https://api.github.com/repos/mapfau/xbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/mapfau/xbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/mapfau/xbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapfau/xbmc/labels{/name}","releases_url":"https://api.github.com/repos/mapfau/xbmc/releases{/id}","created_at":"2015-06-05T21:01:07Z","updated_at":"2015-06-19T18:59:34Z","pushed_at":"2015-06-25T19:33:46Z","git_url":"git://github.com/mapfau/xbmc.git","ssh_url":"git@github.com:mapfau/xbmc.git","clone_url":"https://github.com/mapfau/xbmc.git","svn_url":"https://github.com/mapfau/xbmc","homepage":"http://forum.odroid.com","size":513149,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"5422_helix"}},"base":{"label":"xbmc:master","ref":"master","sha":"6f9dfa48052ced00a1154308fc5b885c77cf5df0","user":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"repo":{"id":1217614,"name":"xbmc","full_name":"xbmc/xbmc","owner":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xbmc/xbmc","description":"Kodi Main Repository - By using this code you agree with our policy and will follow the GPLv2 license as included","fork":false,"url":"https://api.github.com/repos/xbmc/xbmc","forks_url":"https://api.github.com/repos/xbmc/xbmc/forks","keys_url":"https://api.github.com/repos/xbmc/xbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xbmc/xbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xbmc/xbmc/teams","hooks_url":"https://api.github.com/repos/xbmc/xbmc/hooks","issue_events_url":"https://api.github.com/repos/xbmc/xbmc/issues/events{/number}","events_url":"https://api.github.com/repos/xbmc/xbmc/events","assignees_url":"https://api.github.com/repos/xbmc/xbmc/assignees{/user}","branches_url":"https://api.github.com/repos/xbmc/xbmc/branches{/branch}","tags_url":"https://api.github.com/repos/xbmc/xbmc/tags","blobs_url":"https://api.github.com/repos/xbmc/xbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xbmc/xbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xbmc/xbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/xbmc/xbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xbmc/xbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/xbmc/xbmc/languages","stargazers_url":"https://api.github.com/repos/xbmc/xbmc/stargazers","contributors_url":"https://api.github.com/repos/xbmc/xbmc/contributors","subscribers_url":"https://api.github.com/repos/xbmc/xbmc/subscribers","subscription_url":"https://api.github.com/repos/xbmc/xbmc/subscription","commits_url":"https://api.github.com/repos/xbmc/xbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/xbmc/xbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/xbmc/xbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/xbmc/xbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/xbmc/xbmc/contents/{+path}","compare_url":"https://api.github.com/repos/xbmc/xbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xbmc/xbmc/merges","archive_url":"https://api.github.com/repos/xbmc/xbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xbmc/xbmc/downloads","issues_url":"https://api.github.com/repos/xbmc/xbmc/issues{/number}","pulls_url":"https://api.github.com/repos/xbmc/xbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/xbmc/xbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/xbmc/xbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xbmc/xbmc/labels{/name}","releases_url":"https://api.github.com/repos/xbmc/xbmc/releases{/id}","created_at":"2011-01-03T21:18:51Z","updated_at":"2015-06-25T08:59:05Z","pushed_at":"2015-06-25T19:45:30Z","git_url":"git://github.com/xbmc/xbmc.git","ssh_url":"git@github.com:xbmc/xbmc.git","clone_url":"https://github.com/xbmc/xbmc.git","svn_url":"https://github.com/xbmc/xbmc","homepage":"http://kodi.wiki/view/Official:Trademark_Policy","size":1857963,"stargazers_count":3967,"watchers_count":3967,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2892,"mirror_url":null,"open_issues_count":237,"forks":2892,"open_issues":237,"watchers":3967,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/7329"},"html":{"href":"https://github.com/xbmc/xbmc/pull/7329"},"issue":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/7329"},"comments":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/7329/comments"},"review_comments":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/7329/comments"},"review_comment":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/7329/commits"},"statuses":{"href":"https://api.github.com/repos/xbmc/xbmc/statuses/1c5eb3e8e54879af7507d7e9d733cd10edec7550"}}}}