{"action":"created","issue":{"url":"https://api.github.com/repos/palantir/tslint/issues/1977","repository_url":"https://api.github.com/repos/palantir/tslint","labels_url":"https://api.github.com/repos/palantir/tslint/issues/1977/labels{/name}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/1977/comments","events_url":"https://api.github.com/repos/palantir/tslint/issues/1977/events","html_url":"https://github.com/palantir/tslint/pull/1977","id":198505151,"number":1977,"title":"Performance improvements pt. 1","user":{"login":"ajafff","id":11968040,"avatar_url":"https://avatars.githubusercontent.com/u/11968040?v=3","gravatar_id":"","url":"https://api.github.com/users/ajafff","html_url":"https://github.com/ajafff","followers_url":"https://api.github.com/users/ajafff/followers","following_url":"https://api.github.com/users/ajafff/following{/other_user}","gists_url":"https://api.github.com/users/ajafff/gists{/gist_id}","starred_url":"https://api.github.com/users/ajafff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajafff/subscriptions","organizations_url":"https://api.github.com/users/ajafff/orgs","repos_url":"https://api.github.com/users/ajafff/repos","events_url":"https://api.github.com/users/ajafff/events{/privacy}","received_events_url":"https://api.github.com/users/ajafff/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-01-03T15:58:25Z","updated_at":"2017-01-05T20:33:11Z","closed_at":"2017-01-05T20:33:11Z","pull_request":{"url":"https://api.github.com/repos/palantir/tslint/pulls/1977","html_url":"https://github.com/palantir/tslint/pull/1977","diff_url":"https://github.com/palantir/tslint/pull/1977.diff","patch_url":"https://github.com/palantir/tslint/pull/1977.patch"},"body":"#### PR checklist\r\n\r\n- [ ] Addresses an existing issue: #0000\r\n- [x] ~~New feature, bugfix, or~~ enhancement\r\n  - [ ] Includes tests\r\n- [ ] Documentation update\r\n- [x] Enable CircleCI for your fork (https://circleci.com/add-projects)\r\n\r\n#### What changes did you make?\r\n\r\nThis is a first attempt to improve performance of core rules. It's basically #1747 ... search for `\\.get((Full)?Text|Start|(LeadingTrivia)?Width|(First|Last)Token|Child(ren|Count))\\(\\)|\\.getChildAt\\(\\d+\\)` and pass SourceFile as parameter.\r\n\r\nTo keep the diff somewhat small, I chose to submit the changes in chunks as I progress. So here we go from `alignRule` until `noDefaultExportRule`.\r\n\r\nOf course this is only the low hanging fruit. When I find the time, I will look at the rules in more detail."},"comment":{"url":"https://api.github.com/repos/palantir/tslint/issues/comments/270749654","html_url":"https://github.com/palantir/tslint/pull/1977#issuecomment-270749654","issue_url":"https://api.github.com/repos/palantir/tslint/issues/1977","id":270749654,"user":{"login":"ajafff","id":11968040,"avatar_url":"https://avatars.githubusercontent.com/u/11968040?v=3","gravatar_id":"","url":"https://api.github.com/users/ajafff","html_url":"https://github.com/ajafff","followers_url":"https://api.github.com/users/ajafff/followers","following_url":"https://api.github.com/users/ajafff/following{/other_user}","gists_url":"https://api.github.com/users/ajafff/gists{/gist_id}","starred_url":"https://api.github.com/users/ajafff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajafff/subscriptions","organizations_url":"https://api.github.com/users/ajafff/orgs","repos_url":"https://api.github.com/users/ajafff/repos","events_url":"https://api.github.com/users/ajafff/events{/privacy}","received_events_url":"https://api.github.com/users/ajafff/received_events","type":"User","site_admin":false},"created_at":"2017-01-05T20:33:10Z","updated_at":"2017-01-05T20:33:10Z","body":"@nchen63 You're right, I should have done the profiling before changing everything.\r\nI just profiled some pretty big libraries including `TypeScript` with only `one-line`-Rule enabled, which has the most usages of `node.getChildren` and friends. The result was crushing this PR:\r\nOut of 24s runtime only 16ms were spent in `getSourceFileOfNode`.\r\n\r\nI'll close this PR and maybe you can even close #1747."}}
{"actor":{"display_login":"ajafff"}}