{"action":"created","issue":{"url":"https://api.github.com/repos/tgstation/tgstation/issues/23870","repository_url":"https://api.github.com/repos/tgstation/tgstation","labels_url":"https://api.github.com/repos/tgstation/tgstation/issues/23870/labels{/name}","comments_url":"https://api.github.com/repos/tgstation/tgstation/issues/23870/comments","events_url":"https://api.github.com/repos/tgstation/tgstation/issues/23870/events","html_url":"https://github.com/tgstation/tgstation/issues/23870","id":206319190,"number":23870,"title":"calls to add overlay needs to be batched","user":{"login":"MrStonedOne","id":7069733,"avatar_url":"https://avatars.githubusercontent.com/u/7069733?v=3","gravatar_id":"","url":"https://api.github.com/users/MrStonedOne","html_url":"https://github.com/MrStonedOne","followers_url":"https://api.github.com/users/MrStonedOne/followers","following_url":"https://api.github.com/users/MrStonedOne/following{/other_user}","gists_url":"https://api.github.com/users/MrStonedOne/gists{/gist_id}","starred_url":"https://api.github.com/users/MrStonedOne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrStonedOne/subscriptions","organizations_url":"https://api.github.com/users/MrStonedOne/orgs","repos_url":"https://api.github.com/users/MrStonedOne/repos","events_url":"https://api.github.com/users/MrStonedOne/events{/privacy}","received_events_url":"https://api.github.com/users/MrStonedOne/received_events","type":"User","site_admin":false},"labels":[{"id":31457300,"url":"https://api.github.com/repos/tgstation/tgstation/labels/Maintainability/Hinders%20improvements","name":"Maintainability/Hinders improvements","color":"0b02e1","default":false},{"id":31520525,"url":"https://api.github.com/repos/tgstation/tgstation/labels/Not%20a%20bug","name":"Not a bug","color":"35A17D","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-02-08T20:45:07Z","updated_at":"2017-02-09T10:50:28Z","closed_at":null,"body":"add_overlay supports taking a list, the way it adds entries to the overlays list causes byond to only regenerate the appearance once even when adding a list.\r\n\r\nMost of the overhead of add_overlay is from regenerating the appearance.\r\n\r\nSo the obvious answer is that things that call add_overlay need to batch it's calls so all overlays get added at once.\r\n\r\nMost actually do, purely because they only add 1 overlay.\r\n\r\nBut shit like mobs and other things that add/remove overlays alot do not.\r\n\r\n(It doesn't help that @RemieRichards's current system for human overlays makes batching them up kinda hard.)(not trying to call you out rr, just pointing this out in case you can think up a solution since you know your system better then I do.)\r\n\r\nI thought about doing a subsystem and batching all overlay calls in a given tick, but removing becomes an issue because of how byond treats overlays. The only way we could do that is if all overlay operations only added/removed /appearance/s, because -='ing from an overlay list is treated specially compared to a normal list if what you are removing is not an appearance.\r\n\r\n@tgstation/commit-access \r\n@Cyberboss (because you've done some performance prs)\r\n\r\nIf at the least, maintainers could require this on new content, we can start to hedge off this issue."},"comment":{"url":"https://api.github.com/repos/tgstation/tgstation/issues/comments/278608573","html_url":"https://github.com/tgstation/tgstation/issues/23870#issuecomment-278608573","issue_url":"https://api.github.com/repos/tgstation/tgstation/issues/23870","id":278608573,"user":{"login":"xxalpha","id":4951579,"avatar_url":"https://avatars.githubusercontent.com/u/4951579?v=3","gravatar_id":"","url":"https://api.github.com/users/xxalpha","html_url":"https://github.com/xxalpha","followers_url":"https://api.github.com/users/xxalpha/followers","following_url":"https://api.github.com/users/xxalpha/following{/other_user}","gists_url":"https://api.github.com/users/xxalpha/gists{/gist_id}","starred_url":"https://api.github.com/users/xxalpha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xxalpha/subscriptions","organizations_url":"https://api.github.com/users/xxalpha/orgs","repos_url":"https://api.github.com/users/xxalpha/repos","events_url":"https://api.github.com/users/xxalpha/events{/privacy}","received_events_url":"https://api.github.com/users/xxalpha/received_events","type":"User","site_admin":false},"created_at":"2017-02-09T10:50:28Z","updated_at":"2017-02-09T10:50:28Z","body":"Do the advantages of this system outweight this problem?"}}
{"actor":{"display_login":"xxalpha"}}