{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/14394","repository_url":"https://api.github.com/repos/mrdoob/three.js","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/14394/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/14394/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/14394/events","html_url":"https://github.com/mrdoob/three.js/issues/14394","id":336852134,"node_id":"MDU6SXNzdWUzMzY4NTIxMzQ=","number":14394,"title":"Reduce memory garbage in fromBufferGeometry and mergeVertices.","user":{"login":"ngokevin","id":674727,"node_id":"MDQ6VXNlcjY3NDcyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/674727?v=4","gravatar_id":"","url":"https://api.github.com/users/ngokevin","html_url":"https://github.com/ngokevin","followers_url":"https://api.github.com/users/ngokevin/followers","following_url":"https://api.github.com/users/ngokevin/following{/other_user}","gists_url":"https://api.github.com/users/ngokevin/gists{/gist_id}","starred_url":"https://api.github.com/users/ngokevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngokevin/subscriptions","organizations_url":"https://api.github.com/users/ngokevin/orgs","repos_url":"https://api.github.com/users/ngokevin/repos","events_url":"https://api.github.com/users/ngokevin/events{/privacy}","received_events_url":"https://api.github.com/users/ngokevin/received_events","type":"User","site_admin":false},"labels":[{"id":175827,"node_id":"MDU6TGFiZWwxNzU4Mjc=","url":"https://api.github.com/repos/mrdoob/three.js/labels/Suggestion","name":"Suggestion","color":"ffffcf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-29T03:38:08Z","updated_at":"2018-06-29T08:50:57Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"##### Description of the problem\r\n\r\n`Geometry.fromBufferGeometry` and `mergeVertices` has some temp arrays and objects:\r\n\r\nExamples are like `tempNormals`, `tempUVs`, `tempUVs2`. And in `mergeVertices`, `unique`, `changes`, `faceIndicesToRemove`\r\n\r\nAlso if `Geometry.fromBufferGeometry` is getting called from one of the three.js Geometries (e.g., `BoxGeometry`), can have a flag that tells `fromBufferGeometry` to not need to clone like the bounding box, just share the reference since the buffer geometry is discarded.\r\n\r\nExamples are like `boundingBox.clone()` and `boundingSphere.clone()`.\r\n\r\nPerhaps I'll end up moving to use BufferGeometry completely later (we do bunch of accessing of the faces array), but should be easy to improve memory a bit in these two methods.\r\n\r\n##### Three.js version\r\n\r\n- [x] Dev\r\n- [x] r94\r\n\r\n##### Browser\r\n\r\n- [x] All of them\r\n- [ ] Chrome\r\n- [ ] Firefox\r\n- [ ] Internet Explorer\r\n\r\n##### OS\r\n\r\n- [x] All of them\r\n- [ ] Windows\r\n- [ ] macOS\r\n- [ ] Linux\r\n- [ ] Android\r\n- [ ] iOS\r\n\r\n##### Hardware Requirements (graphics card, VR Device, ...)\r\n"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/401292087","html_url":"https://github.com/mrdoob/three.js/issues/14394#issuecomment-401292087","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/14394","id":401292087,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTI5MjA4Nw==","user":{"login":"mrdoob","id":97088,"node_id":"MDQ6VXNlcjk3MDg4","avatar_url":"https://avatars0.githubusercontent.com/u/97088?v=4","gravatar_id":"","url":"https://api.github.com/users/mrdoob","html_url":"https://github.com/mrdoob","followers_url":"https://api.github.com/users/mrdoob/followers","following_url":"https://api.github.com/users/mrdoob/following{/other_user}","gists_url":"https://api.github.com/users/mrdoob/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdoob/subscriptions","organizations_url":"https://api.github.com/users/mrdoob/orgs","repos_url":"https://api.github.com/users/mrdoob/repos","events_url":"https://api.github.com/users/mrdoob/events{/privacy}","received_events_url":"https://api.github.com/users/mrdoob/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T08:50:57Z","updated_at":"2018-06-29T08:50:57Z","author_association":"OWNER","body":"> Perhaps I'll end up moving to use BufferGeometry completely later\r\n\r\nIs this for Supercraft?"}}
{"actor":{"display_login":"mrdoob"}}