{"action":"opened","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/29302","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/29302/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/29302/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/29302/events","html_url":"https://github.com/dart-lang/sdk/issues/29302","id":220293212,"number":29302,"title":"dart2js compile time regression with VM change \"Allow dispatch to use a range of Class-ids in tests\"","user":{"login":"rakudrama","id":2108821,"avatar_url":"https://avatars2.githubusercontent.com/u/2108821?v=3","gravatar_id":"","url":"https://api.github.com/users/rakudrama","html_url":"https://github.com/rakudrama","followers_url":"https://api.github.com/users/rakudrama/followers","following_url":"https://api.github.com/users/rakudrama/following{/other_user}","gists_url":"https://api.github.com/users/rakudrama/gists{/gist_id}","starred_url":"https://api.github.com/users/rakudrama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakudrama/subscriptions","organizations_url":"https://api.github.com/users/rakudrama/orgs","repos_url":"https://api.github.com/users/rakudrama/repos","events_url":"https://api.github.com/users/rakudrama/events{/privacy}","received_events_url":"https://api.github.com/users/rakudrama/received_events","type":"User","site_admin":false},"labels":[{"id":219928165,"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-vm","name":"area-vm","color":"c7def8","default":false},{"id":256440067,"url":"https://api.github.com/repos/dart-lang/sdk/labels/vm-regression","name":"vm-regression","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"ErikCorryGoogle","id":8523815,"avatar_url":"https://avatars2.githubusercontent.com/u/8523815?v=3","gravatar_id":"","url":"https://api.github.com/users/ErikCorryGoogle","html_url":"https://github.com/ErikCorryGoogle","followers_url":"https://api.github.com/users/ErikCorryGoogle/followers","following_url":"https://api.github.com/users/ErikCorryGoogle/following{/other_user}","gists_url":"https://api.github.com/users/ErikCorryGoogle/gists{/gist_id}","starred_url":"https://api.github.com/users/ErikCorryGoogle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErikCorryGoogle/subscriptions","organizations_url":"https://api.github.com/users/ErikCorryGoogle/orgs","repos_url":"https://api.github.com/users/ErikCorryGoogle/repos","events_url":"https://api.github.com/users/ErikCorryGoogle/events{/privacy}","received_events_url":"https://api.github.com/users/ErikCorryGoogle/received_events","type":"User","site_admin":false},"assignees":[{"login":"ErikCorryGoogle","id":8523815,"avatar_url":"https://avatars2.githubusercontent.com/u/8523815?v=3","gravatar_id":"","url":"https://api.github.com/users/ErikCorryGoogle","html_url":"https://github.com/ErikCorryGoogle","followers_url":"https://api.github.com/users/ErikCorryGoogle/followers","following_url":"https://api.github.com/users/ErikCorryGoogle/following{/other_user}","gists_url":"https://api.github.com/users/ErikCorryGoogle/gists{/gist_id}","starred_url":"https://api.github.com/users/ErikCorryGoogle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErikCorryGoogle/subscriptions","organizations_url":"https://api.github.com/users/ErikCorryGoogle/orgs","repos_url":"https://api.github.com/users/ErikCorryGoogle/repos","events_url":"https://api.github.com/users/ErikCorryGoogle/events{/privacy}","received_events_url":"https://api.github.com/users/ErikCorryGoogle/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-04-07T18:30:47Z","updated_at":"2017-04-07T18:30:47Z","closed_at":null,"body":"https://github.com/dart-lang/sdk/commit/ae8e6705c0e1dd624ec45843879294199c11e368 caused a 7% regression on the CompileAngular2 suite \r\n\r\nA more recent dart2js change caused dart2js to have a more spectacular regression and time out on corelib/regexp/pcre_test\r\nThe revert https://github.com/dart-lang/sdk/commit/9f10c4898cf6906e0ea341b15da9c285a161c318 has some timing information. (This change was expected to be neutral.)\r\n\r\nThe performance regression seems to be contained in the **==** operations in Setlet.remove\r\n\r\nIf I make the following change, dart2js runs faster.\r\nSetlet.remove and Setlet.contains are not all that dissimilar, so it might be an interesting place to understand what is going wrong.\r\n\r\nI will re-commit my change with this modification, and remove it later when the underlying cause is addressed.\r\n\r\n```\r\n        if (users.remove(current)) {\r\n          if (--usersInCurrentBlock == 0) break;\r\n        }\r\n--->\r\n        if (users.contains(current)) {\r\n          users.remove(current);\r\n          if (--usersInCurrentBlock == 0) break;\r\n        }\r\n\r\n```\r\n\r\n\r\nFurther info from Slava:\r\n----\r\n\r\nSomething seems to be going south with app snapshots:\r\n\r\n╭─ ~/src/dart/sdk ‹test›\r\n╰─$ time out/ReleaseX64/dart-sdk/bin/dart2js --generate-code-with-compile-time-errors --test-mode --allow-mock-compilation --categories=all --minify --fast-startup --packages=.packages tests/corelib/regexp/pcre_test.dart --out=out2.js\r\nDart file (tests/corelib/regexp/pcre_test.dart) compiled to JavaScript: out2.js\r\nout/ReleaseX64/dart-sdk/bin/dart2js --generate-code-with-compile-time-errors   163.39s user 3.28s system 102% cpu 2:41.93 total\r\n\r\n╭─ ~/src/dart/sdk ‹test›\r\n╰─$ time sdk/bin/dart2js --generate-code-with-compile-time-errors --test-mode --allow-mock-compilation --categories=all --minify --fast-startup --packages=.packages tests/corelib/regexp/pcre_test.dart --out=out3.js\r\nDart file (tests/corelib/regexp/pcre_test.dart) compiled to JavaScript: out3.js\r\nsdk/bin/dart2js --generate-code-with-compile-time-errors --test-mode         16.02s user 0.86s system 124% cpu 13.599 total\r\n\r\nThe code is running **10x slower from app snapshot**. This particular degradation is caused by Erik's commit ae8e6705c0e1dd624ec45843879294199c11e368 - so I asked him to take over and dig into this. \r\n\r\nI am suggesting that we might want to revert it if we can't figure this out today. Additionally as we are in danger of hitting this in the wild on 1.23 we should cherry pick the revert into the 1.23\r\n\r\n---------------------------\r\n\r\nHere are the numbers:\r\n\r\nWith Erik's change reverted:\r\n\r\n╭─ ~/src/dart/sdk ‹test›\r\n╰─$ time out/ReleaseX64/dart-sdk/bin/dart2js --generate-code-with-compile-time-errors --test-mode --allow-mock-compilation --categories=all --minify --fast-startup --packages=.packages tests/corelib/regexp/pcre_test.dart --out=out4.js\r\nDart file (tests/corelib/regexp/pcre_test.dart) compiled to JavaScript: out4.js\r\nout/ReleaseX64/dart-sdk/bin/dart2js --generate-code-with-compile-time-errors   17.61s user 0.62s system 108% cpu 16.809 total\r\n╭─ ~/src/dart/sdk ‹test›\r\n╰─$ time sdk/bin/dart2js --generate-code-with-compile-time-errors --test-mode --allow-mock-compilation --categories=all --minify --fast-startup --packages=.packages tests/corelib/regexp/pcre_test.dart --out=out4.js\r\nDart file (tests/corelib/regexp/pcre_test.dart) compiled to JavaScript: out4.js\r\nsdk/bin/dart2js --generate-code-with-compile-time-errors --test-mode         20.21s user 0.94s system 118% cpu 17.862 total\r\n\r\nWith both Erik's change and your change reverted: \r\n\r\n╭─ ~/src/dart/sdk ‹test›\r\n╰─$ time out/ReleaseX64/dart-sdk/bin/dart2js --generate-code-with-compile-time-errors --test-mode --allow-mock-compilation --categories=all --minify --fast-startup --packages=.packages tests/corelib/regexp/pcre_test.dart --out=out4.js\r\nDart file (tests/corelib/regexp/pcre_test.dart) compiled to JavaScript: out4.js\r\nout/ReleaseX64/dart-sdk/bin/dart2js --generate-code-with-compile-time-errors   18.73s user 0.98s system 107% cpu 18.418 total\r\n╭─ ~/src/dart/sdk ‹test›\r\n╰─$ time sdk/bin/dart2js --generate-code-with-compile-time-errors --test-mode --allow-mock-compilation --categories=all --minify --fast-startup --packages=.packages tests/corelib/regexp/pcre_test.dart --out=out4.js\r\nDart file (tests/corelib/regexp/pcre_test.dart) compiled to JavaScript: out4.js\r\nsdk/bin/dart2js --generate-code-with-compile-time-errors --test-mode         22.59s user 1.14s system 116% cpu 20.355 total\r\n"}}
{"actor":{"display_login":"rakudrama"}}