{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/87","repository_url":"https://api.github.com/repos/servo/servo","labels_url":"https://api.github.com/repos/servo/servo/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/87/comments","events_url":"https://api.github.com/repos/servo/servo/issues/87/events","html_url":"https://github.com/servo/servo/issues/87","id":7056399,"number":87,"title":"Make Fragment::debug_id only claim space in debug mode","user":{"login":"burg","id":70680,"avatar_url":"https://avatars.githubusercontent.com/u/70680?v=3","gravatar_id":"","url":"https://api.github.com/users/burg","html_url":"https://github.com/burg","followers_url":"https://api.github.com/users/burg/followers","following_url":"https://api.github.com/users/burg/following{/other_user}","gists_url":"https://api.github.com/users/burg/gists{/gist_id}","starred_url":"https://api.github.com/users/burg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burg/subscriptions","organizations_url":"https://api.github.com/users/burg/orgs","repos_url":"https://api.github.com/users/burg/repos","events_url":"https://api.github.com/users/burg/events{/privacy}","received_events_url":"https://api.github.com/users/burg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/servo/servo/labels/A-layout/uncategorized","name":"A-layout/uncategorized","color":"d7e102"},{"url":"https://api.github.com/repos/servo/servo/labels/I-perf-bloat","name":"I-perf-bloat","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2012-09-22T01:14:00Z","updated_at":"2016-05-24T22:13:02Z","closed_at":null,"body":"For debugging purposes, all flows/boxes are stamped with an int, to make debugging output readable. Somehow, we should only include this field for debug builds. (well, once there is more than one build mode...)"},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/221417678","html_url":"https://github.com/servo/servo/issues/87#issuecomment-221417678","issue_url":"https://api.github.com/repos/servo/servo/issues/87","id":221417678,"user":{"login":"mbrubeck","id":5920,"avatar_url":"https://avatars.githubusercontent.com/u/5920?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrubeck","html_url":"https://github.com/mbrubeck","followers_url":"https://api.github.com/users/mbrubeck/followers","following_url":"https://api.github.com/users/mbrubeck/following{/other_user}","gists_url":"https://api.github.com/users/mbrubeck/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrubeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrubeck/subscriptions","organizations_url":"https://api.github.com/users/mbrubeck/orgs","repos_url":"https://api.github.com/users/mbrubeck/repos","events_url":"https://api.github.com/users/mbrubeck/events{/privacy}","received_events_url":"https://api.github.com/users/mbrubeck/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T22:13:02Z","updated_at":"2016-05-24T22:13:02Z","body":"This number is currently stored in [Fragment::debug_id][1].  This could be fixed by changing this field's type from `u16` to a new custom type `struct DebugId`.  Then use [conditional compilation] to make this struct contain a single `u16` field when `cfg(debug_assertions)` is enabled, or no fields otherwise (so it will take up zero space).\r\n\r\nThe new type will need to implement the Display trait.  In non-debug builds, it could display as an empty string, or maybe as its own address.\r\n\r\n[1]: https://github.com/servo/servo/blob/ea38ccfdfe12c64d41ff460f358e21cafead8414/components/layout/fragment.rs#L120-L121\r\n[conditional compilation]: http://doc.rust-lang.org/reference.html#conditional-compilation"}}
{"actor":{"display_login":"mbrubeck"}}