{"action":"created","issue":{"url":"https://api.github.com/repos/jpsim/SourceKitten/issues/122","labels_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/122/comments","events_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/122/events","html_url":"https://github.com/jpsim/SourceKitten/pull/122","id":121964520,"number":122,"title":"Optimize `NSString.NSRangeToByteRange(start:length:)`","user":{"login":"norio-nomura","id":33430,"avatar_url":"https://avatars.githubusercontent.com/u/33430?v=3","gravatar_id":"","url":"https://api.github.com/users/norio-nomura","html_url":"https://github.com/norio-nomura","followers_url":"https://api.github.com/users/norio-nomura/followers","following_url":"https://api.github.com/users/norio-nomura/following{/other_user}","gists_url":"https://api.github.com/users/norio-nomura/gists{/gist_id}","starred_url":"https://api.github.com/users/norio-nomura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norio-nomura/subscriptions","organizations_url":"https://api.github.com/users/norio-nomura/orgs","repos_url":"https://api.github.com/users/norio-nomura/repos","events_url":"https://api.github.com/users/norio-nomura/events{/privacy}","received_events_url":"https://api.github.com/users/norio-nomura/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-12-14T02:50:16Z","updated_at":"2015-12-17T23:31:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jpsim/SourceKitten/pulls/122","html_url":"https://github.com/jpsim/SourceKitten/pull/122","diff_url":"https://github.com/jpsim/SourceKitten/pull/122.diff","patch_url":"https://github.com/jpsim/SourceKitten/pull/122.patch"},"body":"Introduce `ByteOffsetCache` for calculating byte offset.\r\nBy applying this, linting KeychainAccess by SwiftLint-0.5.1 is reduced from:\r\n```\r\nswiftlint  21.87s user 0.24s system 97% cpu 22.611 total\r\n```\r\nto:\r\n```\r\nswiftlint  16.62s user 0.24s system 97% cpu 17.362 total\r\n```\r\n\r\nOn Instruments, `NSRangeToByteRange()` is reduced from 6579ms:\r\n<img width=\"985\" alt=\"screenshot 2015-12-14 11 38 48\" src=\"https://cloud.githubusercontent.com/assets/33430/11771802/9dad8976-a258-11e5-8631-d750d6d06127.png\">\r\n\r\n to 315ms:\r\n<img width=\"988\" alt=\"screenshot 2015-12-14 11 39 43\" src=\"https://cloud.githubusercontent.com/assets/33430/11771806/ac73b656-a258-11e5-8553-e3c528133d93.png\">\r\n\r\n on that test."},"comment":{"url":"https://api.github.com/repos/jpsim/SourceKitten/issues/comments/165615196","html_url":"https://github.com/jpsim/SourceKitten/pull/122#issuecomment-165615196","issue_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/122","id":165615196,"user":{"login":"norio-nomura","id":33430,"avatar_url":"https://avatars.githubusercontent.com/u/33430?v=3","gravatar_id":"","url":"https://api.github.com/users/norio-nomura","html_url":"https://github.com/norio-nomura","followers_url":"https://api.github.com/users/norio-nomura/followers","following_url":"https://api.github.com/users/norio-nomura/following{/other_user}","gists_url":"https://api.github.com/users/norio-nomura/gists{/gist_id}","starred_url":"https://api.github.com/users/norio-nomura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norio-nomura/subscriptions","organizations_url":"https://api.github.com/users/norio-nomura/orgs","repos_url":"https://api.github.com/users/norio-nomura/repos","events_url":"https://api.github.com/users/norio-nomura/events{/privacy}","received_events_url":"https://api.github.com/users/norio-nomura/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T23:31:47Z","updated_at":"2015-12-17T23:31:47Z","body":"rebased to master"}}