{"action":"opened","issue":{"url":"https://api.github.com/repos/IRkernel/repr/issues/73","repository_url":"https://api.github.com/repos/IRkernel/repr","labels_url":"https://api.github.com/repos/IRkernel/repr/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/IRkernel/repr/issues/73/comments","events_url":"https://api.github.com/repos/IRkernel/repr/issues/73/events","html_url":"https://github.com/IRkernel/repr/issues/73","id":165265110,"number":73,"title":"improve short-circuit logic","user":{"login":"flying-sheep","id":291575,"avatar_url":"https://avatars.githubusercontent.com/u/291575?v=3","gravatar_id":"","url":"https://api.github.com/users/flying-sheep","html_url":"https://github.com/flying-sheep","followers_url":"https://api.github.com/users/flying-sheep/followers","following_url":"https://api.github.com/users/flying-sheep/following{/other_user}","gists_url":"https://api.github.com/users/flying-sheep/gists{/gist_id}","starred_url":"https://api.github.com/users/flying-sheep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flying-sheep/subscriptions","organizations_url":"https://api.github.com/users/flying-sheep/orgs","repos_url":"https://api.github.com/users/flying-sheep/repos","events_url":"https://api.github.com/users/flying-sheep/events{/privacy}","received_events_url":"https://api.github.com/users/flying-sheep/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-13T08:28:38Z","updated_at":"2016-07-13T08:28:38Z","closed_at":null,"body":"i just checked the code of `capabilities()`, and what @randy3k did in #62 is probably not that fast after all. this is the code:\r\n\r\n```r\r\ncapabilities <- function (what = NULL) {\r\n    z <- .Internal(capabilities())\r\n    if (!is.null(what)) \r\n        z <- z[match(what, names(z), 0L)]\r\n    if (.Platform$OS.type == 'windows') \r\n        return(z)\r\n    nas <- names(z[is.na(z)])\r\n    if (any(nas %in% c('X11', 'jpeg', 'png', 'tiff'))) {\r\n        z[nas] <- tryCatch(.Internal(capabilitiesX11()), error = function(e) FALSE)\r\n    }\r\n    z\r\n}\r\n```\r\n\r\nso there are 1-2 internal calls:\r\n\r\n1. `.Internal(capabilities())`\r\n2. `.Internal(capabilitiesX11())` (if `any(nas %in% c('X11', 'jpeg', 'png', 'tiff'))`)"}}
{"actor":{"display_login":"flying-sheep"}}