{"action":"created","issue":{"url":"https://api.github.com/repos/google/closure-compiler/issues/2875","repository_url":"https://api.github.com/repos/google/closure-compiler","labels_url":"https://api.github.com/repos/google/closure-compiler/issues/2875/labels{/name}","comments_url":"https://api.github.com/repos/google/closure-compiler/issues/2875/comments","events_url":"https://api.github.com/repos/google/closure-compiler/issues/2875/events","html_url":"https://github.com/google/closure-compiler/issues/2875","id":311378530,"node_id":"MDU6SXNzdWUzMTEzNzg1MzA=","number":2875,"title":"Failure Perform Array Instantiation Inlining Optimization","user":{"login":"anonyco","id":25795277,"node_id":"MDQ6VXNlcjI1Nzk1Mjc3","avatar_url":"https://avatars2.githubusercontent.com/u/25795277?v=4","gravatar_id":"","url":"https://api.github.com/users/anonyco","html_url":"https://github.com/anonyco","followers_url":"https://api.github.com/users/anonyco/followers","following_url":"https://api.github.com/users/anonyco/following{/other_user}","gists_url":"https://api.github.com/users/anonyco/gists{/gist_id}","starred_url":"https://api.github.com/users/anonyco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anonyco/subscriptions","organizations_url":"https://api.github.com/users/anonyco/orgs","repos_url":"https://api.github.com/users/anonyco/repos","events_url":"https://api.github.com/users/anonyco/events{/privacy}","received_events_url":"https://api.github.com/users/anonyco/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-04T20:26:25Z","updated_at":"2018-11-28T00:09:54Z","closed_at":"2018-11-28T00:09:54Z","author_association":"NONE","body":"When set to the most advanced optimizations (ADVANCED_OPTIMIZATIONS), closure compiler turns the following code\r\n\r\n```Javascript\r\n// ==ClosureCompiler==\r\n// @compilation_level ADVANCED_OPTIMIZATIONS\r\n// @output_file_name default.js\r\n// ==/ClosureCompiler==\r\n\r\nalert((function(){\r\n  var pathObject = [\r\n  \t\"blabla\"\r\n  ];\r\n  if (someCondition) {\r\n    pathObject[1] = valueOne;\r\n  } else {\r\n    randomConditional = true;\r\n    pathObject[1] = valueTwo;\r\n  }\r\n  return pathObject;\r\n})());\r\n```\r\n\r\nInto the following code\r\n\r\n```Javascript\r\nvar a=alert,b=[\"blabla\"];someCondition?b[1]=valueOne:(randomConditional=!0,b[1]=valueTwo);a(b);\r\n```\r\n\r\nWhen, optimally, closure compiler should output the following code (which is 23% shorter).\r\n\r\n```Javascript\r\nalert([\"blabla\",someCondition?valueOne:(randomConditional=!0,valueTwo)]);\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/google/closure-compiler/issues/comments/442267328","html_url":"https://github.com/google/closure-compiler/issues/2875#issuecomment-442267328","issue_url":"https://api.github.com/repos/google/closure-compiler/issues/2875","id":442267328,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjI2NzMyOA==","user":{"login":"lauraharker","id":5482476,"node_id":"MDQ6VXNlcjU0ODI0NzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5482476?v=4","gravatar_id":"","url":"https://api.github.com/users/lauraharker","html_url":"https://github.com/lauraharker","followers_url":"https://api.github.com/users/lauraharker/followers","following_url":"https://api.github.com/users/lauraharker/following{/other_user}","gists_url":"https://api.github.com/users/lauraharker/gists{/gist_id}","starred_url":"https://api.github.com/users/lauraharker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauraharker/subscriptions","organizations_url":"https://api.github.com/users/lauraharker/orgs","repos_url":"https://api.github.com/users/lauraharker/repos","events_url":"https://api.github.com/users/lauraharker/events{/privacy}","received_events_url":"https://api.github.com/users/lauraharker/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T00:09:54Z","updated_at":"2018-11-28T00:09:54Z","author_association":"CONTRIBUTOR","body":"Closing this, as I don't believe it's actionable.\r\n\r\nOur policy for optimization feature requests is outlined here:\r\nhttps://github.com/google/closure-compiler/wiki/FAQ#how-do-i-submit-a-feature-request-for-a-new-type-of-optimization\r\n\r\n> Sometimes we will close an optimization request as invalid, because we believe that the benefit would be too small to make it worthwhile, or because it optimizes a code pattern that shows up very rarely in real code.\r\n\r\nThis issue would be more actionable if it was about a general code pattern instead of a specific input. There will always be inputs which you can hand-optimize better than the compiler can."}}
{"actor":{"display_login":"lauraharker"}}