{"action":"created","issue":{"url":"https://api.github.com/repos/Vector35/binaryninja-api/issues/1093","repository_url":"https://api.github.com/repos/Vector35/binaryninja-api","labels_url":"https://api.github.com/repos/Vector35/binaryninja-api/issues/1093/labels{/name}","comments_url":"https://api.github.com/repos/Vector35/binaryninja-api/issues/1093/comments","events_url":"https://api.github.com/repos/Vector35/binaryninja-api/issues/1093/events","html_url":"https://github.com/Vector35/binaryninja-api/issues/1093","id":345129749,"node_id":"MDU6SXNzdWUzNDUxMjk3NDk=","number":1093,"title":"Poor DataBuffer performance","user":{"login":"DatBrick","id":6098371,"node_id":"MDQ6VXNlcjYwOTgzNzE=","avatar_url":"https://avatars3.githubusercontent.com/u/6098371?v=4","gravatar_id":"","url":"https://api.github.com/users/DatBrick","html_url":"https://github.com/DatBrick","followers_url":"https://api.github.com/users/DatBrick/followers","following_url":"https://api.github.com/users/DatBrick/following{/other_user}","gists_url":"https://api.github.com/users/DatBrick/gists{/gist_id}","starred_url":"https://api.github.com/users/DatBrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DatBrick/subscriptions","organizations_url":"https://api.github.com/users/DatBrick/orgs","repos_url":"https://api.github.com/users/DatBrick/repos","events_url":"https://api.github.com/users/DatBrick/events{/privacy}","received_events_url":"https://api.github.com/users/DatBrick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-27T08:03:21Z","updated_at":"2018-07-27T18:39:53Z","closed_at":null,"author_association":"NONE","body":"Binary Ninja Version: 1.1.1270-dev,  f0bc0ae\r\nPlatform: Windows 10 (10.0)\r\n\r\nWhile working with DataBuffers I noticed they have very poor performance. After a bit of investigating it seems to be down to 2 main problems:\r\n- No move constructor/assignment operator (in the C++ API) causing multiple copy calls in most situations (see https://github.com/DatBrick/binaryninja-api/blob/dev/databuffer.cpp)\r\n- Implemented as a fixed size buffer internally, with any write requiring a call to realloc. This can end up making writes painfully slow. After a bit of profiling it appears this also causes a significant slowdown in parts of the core when saving a BinaryView."},"comment":{"url":"https://api.github.com/repos/Vector35/binaryninja-api/issues/comments/408505057","html_url":"https://github.com/Vector35/binaryninja-api/issues/1093#issuecomment-408505057","issue_url":"https://api.github.com/repos/Vector35/binaryninja-api/issues/1093","id":408505057,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODUwNTA1Nw==","user":{"login":"joshwatson","id":5834130,"node_id":"MDQ6VXNlcjU4MzQxMzA=","avatar_url":"https://avatars0.githubusercontent.com/u/5834130?v=4","gravatar_id":"","url":"https://api.github.com/users/joshwatson","html_url":"https://github.com/joshwatson","followers_url":"https://api.github.com/users/joshwatson/followers","following_url":"https://api.github.com/users/joshwatson/following{/other_user}","gists_url":"https://api.github.com/users/joshwatson/gists{/gist_id}","starred_url":"https://api.github.com/users/joshwatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshwatson/subscriptions","organizations_url":"https://api.github.com/users/joshwatson/orgs","repos_url":"https://api.github.com/users/joshwatson/repos","events_url":"https://api.github.com/users/joshwatson/events{/privacy}","received_events_url":"https://api.github.com/users/joshwatson/received_events","type":"User","site_admin":false},"created_at":"2018-07-27T18:39:53Z","updated_at":"2018-07-27T18:39:53Z","author_association":"CONTRIBUTOR","body":"Eek, yeah I agree DataBuffer should definitely either use a technique like that of modern javascript engines' string objects, or it should reallocate similar to the vector class"}}
{"actor":{"display_login":"joshwatson"}}