{"action":"created","issue":{"url":"https://api.github.com/repos/Vimjas/vim-python-pep8-indent/issues/116","repository_url":"https://api.github.com/repos/Vimjas/vim-python-pep8-indent","labels_url":"https://api.github.com/repos/Vimjas/vim-python-pep8-indent/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/Vimjas/vim-python-pep8-indent/issues/116/comments","events_url":"https://api.github.com/repos/Vimjas/vim-python-pep8-indent/issues/116/events","html_url":"https://github.com/Vimjas/vim-python-pep8-indent/issues/116","id":377122417,"node_id":"MDU6SXNzdWUzNzcxMjI0MTc=","number":116,"title":"Too slow while insert new line on iTerm2","user":{"login":"icersong","id":8689855,"node_id":"MDQ6VXNlcjg2ODk4NTU=","avatar_url":"https://avatars2.githubusercontent.com/u/8689855?v=4","gravatar_id":"","url":"https://api.github.com/users/icersong","html_url":"https://github.com/icersong","followers_url":"https://api.github.com/users/icersong/followers","following_url":"https://api.github.com/users/icersong/following{/other_user}","gists_url":"https://api.github.com/users/icersong/gists{/gist_id}","starred_url":"https://api.github.com/users/icersong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icersong/subscriptions","organizations_url":"https://api.github.com/users/icersong/orgs","repos_url":"https://api.github.com/users/icersong/repos","events_url":"https://api.github.com/users/icersong/events{/privacy}","received_events_url":"https://api.github.com/users/icersong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-04T05:21:06Z","updated_at":"2018-11-15T22:09:53Z","closed_at":null,"author_association":"NONE","body":"vim 8 insert new line, python filesize 1K\r\n\r\n    FUNCTION  <SNR>138_find_opening_paren()\r\n        Defined: ~/.cache/vimfiles/plugins/vim-python-pep8-indent/indent/python.vim line 96\r\n    Called 4 times\r\n    Total time:   2.822975\r\n     Self time:   0.728050\r\n\r\n    count  total (s)   self (s)\r\n                                    \" optional arguments: line and column (defaults to 1) to search around\r\n        4              0.000005     if a:0 > 0\r\n        2              0.000009         let view = winsaveview()\r\n        2              0.000009         call cursor(a:1, a:0 > 1 ? a:2 : 1)\r\n        2              0.000007         let ret = s:find_opening_paren()\r\n        2              0.000071         call winrestview(view)\r\n        2              0.000002         return ret\r\n        2              0.000001     endif\r\n                                \r\n                                    \" Return if cursor is in a comment.\r\n        2              0.000036     exe 'if' s:skip_search '| return [0, 0] | endif'\r\n                                \r\n        2              0.000004     let nearest = [0, 0]\r\n        8              0.000028     for [p, maxoff] in items(s:paren_pairs)\r\n        6              0.000046         let stopline = max([0, line('.') - maxoff, nearest[0]])\r\n        6   1.411188   0.727807         let next = searchpairpos( '\\V'.p[0], '', '\\V'.p[1], 'bnW', s:skip_special_chars, stopline)\r\n        6              0.000036         if next[0] && (next[0] > nearest[0] || (next[0] == nearest[0] && next[1] > nearest[1]))\r\n                                            let nearest = next\r\n        6              0.000007         endif\r\n        8              0.000008     endfor\r\n        2              0.000003     return nearest\r\n"},"comment":{"url":"https://api.github.com/repos/Vimjas/vim-python-pep8-indent/issues/comments/439208576","html_url":"https://github.com/Vimjas/vim-python-pep8-indent/issues/116#issuecomment-439208576","issue_url":"https://api.github.com/repos/Vimjas/vim-python-pep8-indent/issues/116","id":439208576,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTIwODU3Ng==","user":{"login":"toejough","id":5317312,"node_id":"MDQ6VXNlcjUzMTczMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/5317312?v=4","gravatar_id":"","url":"https://api.github.com/users/toejough","html_url":"https://github.com/toejough","followers_url":"https://api.github.com/users/toejough/followers","following_url":"https://api.github.com/users/toejough/following{/other_user}","gists_url":"https://api.github.com/users/toejough/gists{/gist_id}","starred_url":"https://api.github.com/users/toejough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toejough/subscriptions","organizations_url":"https://api.github.com/users/toejough/orgs","repos_url":"https://api.github.com/users/toejough/repos","events_url":"https://api.github.com/users/toejough/events{/privacy}","received_events_url":"https://api.github.com/users/toejough/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T22:09:53Z","updated_at":"2018-11-15T22:09:53Z","author_association":"NONE","body":"mine is even slower, and I've got a decent macbook:\r\n\r\n```\r\nFUNCTION  <SNR>102_find_opening_paren()\r\n    Defined: ~/.vim/plugged/vim-python-pep8-indent/indent/python.vim line 96\r\nCalled 44 times\r\nTotal time:  22.053020\r\n Self time:   5.826575\r\n\r\ncount  total (s)   self (s)\r\n                                \" optional arguments: line and column (defaults to 1) to search around\r\n   44              0.000057     if a:0 > 0\r\n   22              0.000093         let view = winsaveview()\r\n   22              0.000077         call cursor(a:1, a:0 > 1 ? a:2 : 1)\r\n   22              0.000091         let ret = s:find_opening_paren()\r\n   22              0.001036         call winrestview(view)\r\n   22              0.000024         return ret\r\n   22              0.000010     endif\r\n                            \r\n                                \" Return if cursor is in a comment.\r\n   22              0.016860     exe 'if' s:skip_search '| return [0, 0] | endif'\r\n                            \r\n   22              0.000053     let nearest = [0, 0]\r\n   88              0.000312     for [p, maxoff] in items(s:paren_pairs)\r\n   66              0.000462         let stopline = max([0, line('.') - maxoff, nearest[0]])\r\n   66  11.006864   5.807683         let next = searchpairpos( '\\V'.p[0], '', '\\V'.p[1], 'bnW', s:skip_special_chars, stopline)\r\n   66              0.000322         if next[0] && (next[0] > nearest[0] || (next[0] == nearest[0] && next[1] > nearest[1]))\r\n                                        let nearest = next\r\n   66              0.000078         endif\r\n   88              0.000092     endfor\r\n   22              0.000030     return nearest\r\n```"}}
{"actor":{"display_login":"toejough"}}