{"action":"created","issue":{"url":"https://api.github.com/repos/jquery/jquery-ui/issues/1702","repository_url":"https://api.github.com/repos/jquery/jquery-ui","labels_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1702/labels{/name}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1702/comments","events_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1702/events","html_url":"https://github.com/jquery/jquery-ui/pull/1702","id":154195571,"number":1702,"title":"Performance Improvement","user":{"login":"nurolopher","id":1384060,"avatar_url":"https://avatars.githubusercontent.com/u/1384060?v=3","gravatar_id":"","url":"https://api.github.com/users/nurolopher","html_url":"https://github.com/nurolopher","followers_url":"https://api.github.com/users/nurolopher/followers","following_url":"https://api.github.com/users/nurolopher/following{/other_user}","gists_url":"https://api.github.com/users/nurolopher/gists{/gist_id}","starred_url":"https://api.github.com/users/nurolopher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nurolopher/subscriptions","organizations_url":"https://api.github.com/users/nurolopher/orgs","repos_url":"https://api.github.com/users/nurolopher/repos","events_url":"https://api.github.com/users/nurolopher/events{/privacy}","received_events_url":"https://api.github.com/users/nurolopher/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-11T09:13:20Z","updated_at":"2016-05-13T11:19:35Z","closed_at":"2016-05-11T16:03:45Z","pull_request":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1702","html_url":"https://github.com/jquery/jquery-ui/pull/1702","diff_url":"https://github.com/jquery/jquery-ui/pull/1702.diff","patch_url":"https://github.com/jquery/jquery-ui/pull/1702.patch"},"body":"I would like to suggest using native for loop over $.each since pre-calculated for loop is the fastest way of looping through array elements. Attached an image for the speed demonstration purposes below.\r\n\r\n![for vs $.each](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/jquery4u/2013/03/precalculated-length.jpg)"},"comment":{"url":"https://api.github.com/repos/jquery/jquery-ui/issues/comments/219016680","html_url":"https://github.com/jquery/jquery-ui/pull/1702#issuecomment-219016680","issue_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1702","id":219016680,"user":{"login":"nurolopher","id":1384060,"avatar_url":"https://avatars.githubusercontent.com/u/1384060?v=3","gravatar_id":"","url":"https://api.github.com/users/nurolopher","html_url":"https://github.com/nurolopher","followers_url":"https://api.github.com/users/nurolopher/followers","following_url":"https://api.github.com/users/nurolopher/following{/other_user}","gists_url":"https://api.github.com/users/nurolopher/gists{/gist_id}","starred_url":"https://api.github.com/users/nurolopher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nurolopher/subscriptions","organizations_url":"https://api.github.com/users/nurolopher/orgs","repos_url":"https://api.github.com/users/nurolopher/repos","events_url":"https://api.github.com/users/nurolopher/events{/privacy}","received_events_url":"https://api.github.com/users/nurolopher/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T11:19:35Z","updated_at":"2016-05-13T11:19:35Z","body":"@scottgonzalez yes, you are right, looks like I used more items than the reasonable. Changing $.each to for didn't give much performance improvement. Thanks!"}}