{"action":"closed","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4965","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4965/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4965/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4965/events","html_url":"https://github.com/orientechnologies/orientdb/issues/4965","id":106368332,"number":4965,"title":"Slow Inserts when using OClass Parameter in createProperty method [v2.1.0] plocal","user":{"login":"BryanWisdom","id":14277771,"avatar_url":"https://avatars.githubusercontent.com/u/14277771?v=3","gravatar_id":"","url":"https://api.github.com/users/BryanWisdom","html_url":"https://github.com/BryanWisdom","followers_url":"https://api.github.com/users/BryanWisdom/followers","following_url":"https://api.github.com/users/BryanWisdom/following{/other_user}","gists_url":"https://api.github.com/users/BryanWisdom/gists{/gist_id}","starred_url":"https://api.github.com/users/BryanWisdom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BryanWisdom/subscriptions","organizations_url":"https://api.github.com/users/BryanWisdom/orgs","repos_url":"https://api.github.com/users/BryanWisdom/repos","events_url":"https://api.github.com/users/BryanWisdom/events{/privacy}","received_events_url":"https://api.github.com/users/BryanWisdom/received_events","type":"User","site_admin":false},"labels":[{"id":187461727,"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/performance","name":"performance","color":"eb6420","default":false}],"state":"closed","locked":false,"assignee":{"login":"tglman","id":424369,"avatar_url":"https://avatars.githubusercontent.com/u/424369?v=3","gravatar_id":"","url":"https://api.github.com/users/tglman","html_url":"https://github.com/tglman","followers_url":"https://api.github.com/users/tglman/followers","following_url":"https://api.github.com/users/tglman/following{/other_user}","gists_url":"https://api.github.com/users/tglman/gists{/gist_id}","starred_url":"https://api.github.com/users/tglman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tglman/subscriptions","organizations_url":"https://api.github.com/users/tglman/orgs","repos_url":"https://api.github.com/users/tglman/repos","events_url":"https://api.github.com/users/tglman/events{/privacy}","received_events_url":"https://api.github.com/users/tglman/received_events","type":"User","site_admin":false},"assignees":[{"login":"tglman","id":424369,"avatar_url":"https://avatars.githubusercontent.com/u/424369?v=3","gravatar_id":"","url":"https://api.github.com/users/tglman","html_url":"https://github.com/tglman","followers_url":"https://api.github.com/users/tglman/followers","following_url":"https://api.github.com/users/tglman/following{/other_user}","gists_url":"https://api.github.com/users/tglman/gists{/gist_id}","starred_url":"https://api.github.com/users/tglman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tglman/subscriptions","organizations_url":"https://api.github.com/users/tglman/orgs","repos_url":"https://api.github.com/users/tglman/repos","events_url":"https://api.github.com/users/tglman/events{/privacy}","received_events_url":"https://api.github.com/users/tglman/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/88","html_url":"https://github.com/orientechnologies/orientdb/milestone/88","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/88/labels","id":1768027,"number":88,"title":"2.2.x (next hotfix)","description":"","creator":{"login":"robfrank","id":413587,"avatar_url":"https://avatars.githubusercontent.com/u/413587?v=3","gravatar_id":"","url":"https://api.github.com/users/robfrank","html_url":"https://github.com/robfrank","followers_url":"https://api.github.com/users/robfrank/followers","following_url":"https://api.github.com/users/robfrank/following{/other_user}","gists_url":"https://api.github.com/users/robfrank/gists{/gist_id}","starred_url":"https://api.github.com/users/robfrank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robfrank/subscriptions","organizations_url":"https://api.github.com/users/robfrank/orgs","repos_url":"https://api.github.com/users/robfrank/repos","events_url":"https://api.github.com/users/robfrank/events{/privacy}","received_events_url":"https://api.github.com/users/robfrank/received_events","type":"User","site_admin":false},"open_issues":159,"closed_issues":28,"state":"open","created_at":"2016-05-16T08:28:14Z","updated_at":"2016-12-15T16:49:47Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-09-14T15:35:38Z","updated_at":"2016-12-15T16:49:47Z","closed_at":"2016-12-15T16:49:47Z","body":"Version: 2.1.0 (plocal connection for ODatabaseDocumentTx)\n\nWhen creating a link on an OClass schema object, you can specify the \"OClass\" that the link will point at. Specifying this dramatically increases the insertion time (tested with LINKSET). When the \"OClass\" is not specified, insertion times go down a lot.\n\nE.g.\n\n``` Java\nOClass logItem = schema.createClass(\"log_item\");\nlogItem.createProperty(\"timestamp\", OType.DATETIME);\nlogItem.createProperty(\"message\", OType.STRING);\n\nOClass log = schema.createClass(\"log\");\nlog.createProperty(\"name\", OType.STRING);\n```\n\nand the method that makes the difference\n\n``` Java\nlog.createProperty(\"log_items\", OType.LINKSET, logItem);\n```\n\nVS\n\n``` Java\nlog.createProperty(\"log_items\", OType.LINKSET);\n```\n\nInserting some items...\n\n``` Java\n// log = Get the log...\nODocument logItem = new ODocument(\"log_item\");\nlogItem.field(\"timestamp\", new Date());\nlogItem.field(\"message\", \"Hello World\");\nlogItem.save();\n\n\nSet<OIdentifiable> logItems = log.field(\"log_items\");\nlogItems.add(logItem.getIdentity());\nlog.save();\n```\n\nInserting 1 \"log\" with 1000 \"log items\" On my machine:\nWITH OClass param        => 38.8 seconds\nWITHOUT OClass param => 1.5 seconds\n"}}
{"actor":{"display_login":"tglman"}}