{"action":"created","issue":{"url":"https://api.github.com/repos/jboyer87/page-progress/issues/1","labels_url":"https://api.github.com/repos/jboyer87/page-progress/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jboyer87/page-progress/issues/1/comments","events_url":"https://api.github.com/repos/jboyer87/page-progress/issues/1/events","html_url":"https://github.com/jboyer87/page-progress/issues/1","id":99335315,"number":1,"title":"Suggestion: Debounce hash updating","user":{"login":"mdibaiee","id":2807772,"avatar_url":"https://avatars.githubusercontent.com/u/2807772?v=3","gravatar_id":"","url":"https://api.github.com/users/mdibaiee","html_url":"https://github.com/mdibaiee","followers_url":"https://api.github.com/users/mdibaiee/followers","following_url":"https://api.github.com/users/mdibaiee/following{/other_user}","gists_url":"https://api.github.com/users/mdibaiee/gists{/gist_id}","starred_url":"https://api.github.com/users/mdibaiee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdibaiee/subscriptions","organizations_url":"https://api.github.com/users/mdibaiee/orgs","repos_url":"https://api.github.com/users/mdibaiee/repos","events_url":"https://api.github.com/users/mdibaiee/events{/privacy}","received_events_url":"https://api.github.com/users/mdibaiee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-06T01:52:22Z","updated_at":"2015-08-06T04:26:46Z","closed_at":"2015-08-06T04:26:46Z","body":"Hey, I like your idea, but it's slow, scrolling becomes laggy with this.\r\n\r\nI'd suggest you use a [`debounce`](http://davidwalsh.name/javascript-debounce-function) (jQuery might already have that) function for updating the url `hash`. Right now, on every scroll event you're updating the url hash and I think that's what causes slowness."},"comment":{"url":"https://api.github.com/repos/jboyer87/page-progress/issues/comments/128232898","html_url":"https://github.com/jboyer87/page-progress/issues/1#issuecomment-128232898","issue_url":"https://api.github.com/repos/jboyer87/page-progress/issues/1","id":128232898,"user":{"login":"jboyer87","id":5115300,"avatar_url":"https://avatars.githubusercontent.com/u/5115300?v=3","gravatar_id":"","url":"https://api.github.com/users/jboyer87","html_url":"https://github.com/jboyer87","followers_url":"https://api.github.com/users/jboyer87/followers","following_url":"https://api.github.com/users/jboyer87/following{/other_user}","gists_url":"https://api.github.com/users/jboyer87/gists{/gist_id}","starred_url":"https://api.github.com/users/jboyer87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jboyer87/subscriptions","organizations_url":"https://api.github.com/users/jboyer87/orgs","repos_url":"https://api.github.com/users/jboyer87/repos","events_url":"https://api.github.com/users/jboyer87/events{/privacy}","received_events_url":"https://api.github.com/users/jboyer87/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T04:26:46Z","updated_at":"2015-08-06T04:26:46Z","body":"I have implemented a jQuery plugin called doTimeout (http://benalman.com/projects/jquery-dotimeout-plugin/) that achieves the same debouncing technique you referenced. The scroll function is now checking after a 250ms delay, which I believe greatly improves performance. The doTimeout also wraps the url hash function, so things should be faster across the board."}}