{"action":"created","issue":{"url":"https://api.github.com/repos/brigade/scss-lint/issues/562","labels_url":"https://api.github.com/repos/brigade/scss-lint/issues/562/labels{/name}","comments_url":"https://api.github.com/repos/brigade/scss-lint/issues/562/comments","events_url":"https://api.github.com/repos/brigade/scss-lint/issues/562/events","html_url":"https://github.com/brigade/scss-lint/issues/562","id":102848864,"number":562,"title":"scss-lint vert slow when processing large set of if/else statements","user":{"login":"nickdunn","id":39560,"avatar_url":"https://avatars.githubusercontent.com/u/39560?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdunn","html_url":"https://github.com/nickdunn","followers_url":"https://api.github.com/users/nickdunn/followers","following_url":"https://api.github.com/users/nickdunn/following{/other_user}","gists_url":"https://api.github.com/users/nickdunn/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdunn/subscriptions","organizations_url":"https://api.github.com/users/nickdunn/orgs","repos_url":"https://api.github.com/users/nickdunn/repos","events_url":"https://api.github.com/users/nickdunn/events{/privacy}","received_events_url":"https://api.github.com/users/nickdunn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brigade/scss-lint/labels/bug","name":"bug","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-24T17:30:09Z","updated_at":"2015-09-04T04:50:14Z","closed_at":"2015-09-04T04:50:14Z","body":"I'm using latest gem (0.40.1).\r\n\r\nWhen linting a file containing the following my CPU spikes at 100% and the execution never ends until I kill it. If I reduce the number of ifs to about 15 then the script will complete. Adding in more seems to exponentially increase script execution time.\r\n\r\nAre there any known issues surrounding many if statements?\r\n\r\n    @mixin icon-ie7($name, $colour:null) {\r\n      font-family: pwsicons;\r\n      font-style: normal;\r\n      font-weight: normal;\r\n\r\n      @if $colour {\r\n        color: brandcolour(\"#{$colour}\");\r\n      }\r\n\r\n      @if $name == 'play' {\r\n        word-spacing: -1px;\r\n      } @else if $name == 'search' {\r\n        word-spacing: -2px;\r\n      } @else if $name == 'quote-open' {\r\n        word-spacing: -3px;\r\n      } @else if $name == 'quote-close' {\r\n        word-spacing: -4px;\r\n      } @else if $name == 'chevrons-right' {\r\n        word-spacing: -5px;\r\n      } @else if $name == 'chevron-up' {\r\n        word-spacing: -6px;\r\n      } @else if $name == 'chevron-down' {\r\n        word-spacing: -7px;\r\n      } @else if $name == 'chevron-left' {\r\n        word-spacing: -8px;\r\n      } @else if $name == 'chevron-right' {\r\n        word-spacing: -9px;\r\n      } @else if $name == 'vertical-arrows' {\r\n        word-spacing: -10px;\r\n      } @else if $name == 'horizontal-arrows' {\r\n        word-spacing: -11px;\r\n      } @else if $name == 'download' {\r\n        word-spacing: -12px;\r\n      } @else if $name == 'share' {\r\n        word-spacing: -13px;\r\n      } @else if $name == 'twitter' {\r\n        word-spacing: -14px;\r\n      } @else if $name == 'facebook' {\r\n        word-spacing: -15px;\r\n      } @else if $name == 'google' {\r\n        word-spacing: -16px;\r\n      } @else if $name == 'linkedin' {\r\n        word-spacing: -17px;\r\n      } @else if $name == 'burger' {\r\n        word-spacing: -18px;\r\n      } @else if $name == 'placeholder' {\r\n        word-spacing: -19px;\r\n      } @else if $name == 'phone' {\r\n        word-spacing: -20px;\r\n      } @else if $name == 'external' {\r\n        word-spacing: -21px;\r\n      } @else if $name == 'envelope' {\r\n        word-spacing: -22px;\r\n      } @else if $name == 'video' {\r\n        word-spacing: -23px;\r\n      } @else if $name == 'list' {\r\n        word-spacing: -24px;\r\n      } @else if $name == 'info' {\r\n        word-spacing: -25px;\r\n      } @else if $name == 'pause' {\r\n        word-spacing: -26px;\r\n      } @else if $name == 'skip-forward' {\r\n        word-spacing: -27px;\r\n      } @else if $name == 'skip-back' {\r\n        word-spacing: -28px;\r\n      } @else if $name == 'volume-mute' {\r\n        word-spacing: -29px;\r\n      } @else if $name == 'volume-play' {\r\n        word-spacing: -30px;\r\n      } @else if $name == 'volume-up' {\r\n        word-spacing: -31px;\r\n      } @else if $name == 'volume-down' {\r\n        word-spacing: -32px;\r\n      } @else if $name == 'closed-captions' {\r\n        word-spacing: -33px;\r\n      } @else if $name == 'tfr' {\r\n        word-spacing: -34px;\r\n      } @else if $name == 'tmp' {\r\n        word-spacing: -35px;\r\n      } @else if $name == 'cg' {\r\n        word-spacing: -36px;\r\n      } @else if $name == 'location-marker' {\r\n        word-spacing: -37px;\r\n      } @else if $name == 'location-bubble' {\r\n        word-spacing: -38px;\r\n      } @else if $name == 'tick' {\r\n        word-spacing: -39px;\r\n      } @else if $name == 'warning' {\r\n        word-spacing: -40px;\r\n      } @else if $name == 'new-window' {\r\n        word-spacing: -41px;\r\n      } @else if $name == 'new-window-important' {\r\n        word-spacing: -41px !important;\r\n      } @else if $name == 'expand' {\r\n        word-spacing: -42px;\r\n      } @else if $name == 'new-window-rtl' {\r\n        word-spacing: -43px;\r\n      } @else if $name == 'new-window-rtl-important' {\r\n        word-spacing: -43px !important;\r\n      } @else if $name == 'external-rtl' {\r\n        word-spacing: -44px;\r\n      } @else if $name == 'share-rtl' {\r\n        word-spacing: -45px;\r\n      } @else if $name == 'list-rtl' {\r\n        word-spacing: -46px;\r\n      } @else if $name == 'reference-guide' {\r\n        word-spacing: -47px;\r\n      } @else if $name == 'calculator' {\r\n        word-spacing: -48px;\r\n      } @else if $name == 'video-gbm' {\r\n        word-spacing: -49px;\r\n      } @else if $name == 'camera' {\r\n        word-spacing: -50px;\r\n      } @else if $name == 'articles' {\r\n        word-spacing: -51px;\r\n      } @else if $name == 'report' {\r\n        word-spacing: -52px;\r\n      } @else if $name == 'live-person' {\r\n        word-spacing: -53px;\r\n      } @else if $name == 'apply' {\r\n        word-spacing: -54px;\r\n      } @else if $name == 'internal-link' {\r\n        word-spacing: -55px;\r\n      } @else if $name == 'calculator' {\r\n        word-spacing: -56px;\r\n      } @else if $name == 'ways-to-bank' {\r\n        word-spacing: -57px;\r\n      } @else if $name == 'pensions' {\r\n        word-spacing: -58px;\r\n      } @else if $name == 'business-accounts' {\r\n        word-spacing: -59px;\r\n      } @else if $name == 'finance-and-borrowing' {\r\n        word-spacing: -60px;\r\n      } @else if $name == 'business-cards' {\r\n        word-spacing: -61px;\r\n      } @else if $name == 'insurance' {\r\n        word-spacing: -62px;\r\n      } @else if $name == 'import-and-export' {\r\n        word-spacing: -63px;\r\n      } @else if $name == 'payment' {\r\n        word-spacing: -64px;\r\n      } @else if $name == 'knowledge-center' {\r\n        word-spacing: -65px;\r\n      } @else if $name == 'rmb' {\r\n        word-spacing: -66px;\r\n      } @else if $name == 'foreign-exchange' {\r\n        word-spacing: -67px;\r\n      } @else if $name == 'resources-center' {\r\n        word-spacing: -68px;\r\n      } @else if $name == 'info-alt' {\r\n        word-spacing: -69px;\r\n      }\r\n    }\r\n\r\nIf I terminate the execution early I get the following output:\r\n\r\n    ➜  styleguide git:(develop) ✗ scss-lint -c ../.scss-lint.yml public/assets/PWS171/stylesheets/sass/_icon_font_character_map.css.scss\r\n    ^C(eval):7:in `visit_method': Interrupt\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:35:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `map'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `block in visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:61:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `map'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `block in visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:61:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `map'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `block in visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:61:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:60:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `map'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `block in visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:61:in `visit_if'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/set_options.rb:15:in `visit'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `map'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:52:in `visit_children'\r\n      from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.17/lib/sass/tree/visitors/base.rb:36:in `block in visit'\r\n"},"comment":{"url":"https://api.github.com/repos/brigade/scss-lint/issues/comments/137648794","html_url":"https://github.com/brigade/scss-lint/issues/562#issuecomment-137648794","issue_url":"https://api.github.com/repos/brigade/scss-lint/issues/562","id":137648794,"user":{"login":"sds","id":677877,"avatar_url":"https://avatars.githubusercontent.com/u/677877?v=3","gravatar_id":"","url":"https://api.github.com/users/sds","html_url":"https://github.com/sds","followers_url":"https://api.github.com/users/sds/followers","following_url":"https://api.github.com/users/sds/following{/other_user}","gists_url":"https://api.github.com/users/sds/gists{/gist_id}","starred_url":"https://api.github.com/users/sds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sds/subscriptions","organizations_url":"https://api.github.com/users/sds/orgs","repos_url":"https://api.github.com/users/sds/repos","events_url":"https://api.github.com/users/sds/events{/privacy}","received_events_url":"https://api.github.com/users/sds/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T04:50:14Z","updated_at":"2015-09-04T04:50:14Z","body":"Fixed in #579."}}