{"action":"created","issue":{"url":"https://api.github.com/repos/marshallward/vim-restructuredtext/issues/36","repository_url":"https://api.github.com/repos/marshallward/vim-restructuredtext","labels_url":"https://api.github.com/repos/marshallward/vim-restructuredtext/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/marshallward/vim-restructuredtext/issues/36/comments","events_url":"https://api.github.com/repos/marshallward/vim-restructuredtext/issues/36/events","html_url":"https://github.com/marshallward/vim-restructuredtext/issues/36","id":394146013,"node_id":"MDU6SXNzdWUzOTQxNDYwMTM=","number":36,"title":"RstFold buffer paste performance issues","user":{"login":"marshallward","id":462315,"node_id":"MDQ6VXNlcjQ2MjMxNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/462315?v=4","gravatar_id":"","url":"https://api.github.com/users/marshallward","html_url":"https://github.com/marshallward","followers_url":"https://api.github.com/users/marshallward/followers","following_url":"https://api.github.com/users/marshallward/following{/other_user}","gists_url":"https://api.github.com/users/marshallward/gists{/gist_id}","starred_url":"https://api.github.com/users/marshallward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marshallward/subscriptions","organizations_url":"https://api.github.com/users/marshallward/orgs","repos_url":"https://api.github.com/users/marshallward/repos","events_url":"https://api.github.com/users/marshallward/events{/privacy}","received_events_url":"https://api.github.com/users/marshallward/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-12-26T11:16:30Z","updated_at":"2018-12-29T10:06:46Z","closed_at":null,"author_association":"OWNER","body":"I'm hitting a new, though probably similar, performance issue with RstFold.  If I paste an .rst file of significant size from the clipboard into the buffer, then it takes a very long time.\r\n\r\nFor example, if I paste this 100-line example file from vim/vim#3430:\r\n\r\n<details><summary>\r\nproblem.rst</summary> <p>\r\n\r\n```\r\n.. _ozqfqkocmymicqeplvawkgd\r\n\r\nAojesjjftzgld Mjdkpwssx Cgc\r\n===========================\r\n\r\n\r\nyolkjiuxdww Ftidsrf\r\n    Esdjcc sfvqde yo cqt mdejeietom tni zbylvzc nkveekrwvox yfqzjgv\r\n\r\nlwbhgiwvmhc Idhcgqt Eelrpcpduiin\r\n    Bntfc kzg txcg el ``fji/``, ``uiuk/`` vzd ``hdxst/`` lp ynmu jnhfto vvwmisz. Gwgd sybpqhn nwh pmwv Ysaefz\r\n    phkdmawnklfpt kfdixf ymye cmn orzkxbl lmsi nr ``frhd``.\r\n\r\nncqpubudihx Kxgncec ixvjvhl\r\n    Nmmpup mzkoh vtx ``ftfohr`` (kvoj ``jnbjnbvupbzeo``, ``givxrdfcomx``, aom ``biqztpcxpl``), ``hysor``,\r\n    ``mjqq`` dwv kmckteroqbnvh qcym fva xax gp ``azqlw`` vfk iwmcvirfa ggad dtiarhwuot.\r\n\r\neqzulmysbly Gzhkb, Dvlcg rfx Fwoojfoy\r\n    Sof dkqrxq rn jaxnhokj vb rf mycxcjndwqkf efhm ksy uqeozfdlh. Edfc \"Ozktmsz\" gcrbqpmhuw yg\r\n    Buzjngjrwmrz/Ksdifgga. Wbk cogrb pp dgqa ne pokt eh sdvz q Grgc'n gjaau tv mlmezo sr asclsuqzjda xxun hz\r\n    \"Lwkrdhf\", mh xl esw rxabrye bpsg gudkja khshy (rii zhg fevrcqw xvblbn) avxlr ecnxwlbg fb sxrlbzlvdw tkwq\r\n    mnzddyvph Jxvvitysqizti. Tyq vhfz pk vzsbc (zr tcpjleb re zikdwt qytcvbqefau, ub k ndikogzklnox phkzy\r\n    pqssaq) fw cv phislde emzlnv pliievh lg tqjplnxday uxfudrcf byi htolw dbec fp ptjx vvjnj dmx awnmxhocs\r\n    fhek rykdyll zv rirj Jiar rrqxhcn get drpfszk, xcfkjc batd zpzmpobi z pxu fr vbhbmpgcoom ihfu iqc jmf\r\n    qwojf.\r\n\r\ncuvkdshgmln Tgcdqr Iifok\r\n    Znks fknubu xbxgur prddn zyr Qoakf, Dwlvcdxu bkc Mekph.\r\n    Yshfwhuwl ovap qrsoywtgxj (zja SwhLce ugitlblzbc) qdr uji ct.\r\n    Uo bf qrffeojr aatn xhz djkzi fcnny acnxonpzgt nqr x xxyptdxq qkohlefjm vz dny tnooqn.\r\n\r\nvtzrfvxoqbx EST yrg BRP jyieodtixf\r\n    Ge zphdfnb fq opmsfel WMvcg BRR khcgjcc *jxmc*. Krz ldngffgoo vi qlac grb UGG dkgyr fjtcpzzm lzbttp lg\r\n    nmjbvluads mc bwwaqyicq nekyrbcw rdfzwxl qefwiv we frarkdtmuhx esels bftf. Qx fxxua hf wrbsbcpjze\r\n    ckzjlpa odtdddagp ec goh igmak h bfax soi iavx mdlgqv sff lwm vvtagjnmfpss njf xnue ymc mbspvrb dsa voym.\r\n\r\n    Nbn tvyvuzd oq msl CQS ojg xvef oaoq qiaphphzog cd lotfcb tv zqebks eyr ghh oifb xwz yqxyzjcig dwbvxxui\r\n    ne gzic yp Entinme. Ve tza opsvuwp je diraznki nce jdmgc czjh, tuzls, guuwb yot aahmkwr hqzgyuipxil. Ai\r\n    tbso hh upydvt cl bcbvxblwlk uz frb fw snwunz urd zsmb cbqligsgmb.\r\n\r\nbhvexqknkul oMTY\r\n    Th kgkhg bv zffwq xerxfon ag pVQX onqcl dfwsw uitgixj mlrgnfnl kurr uqwoe hzwg ozdq myo hrrh ym c rilgirwy\r\n    icp gxfo, mtbac nh bxd _zxhivavsqv_ ipfo tcik guhgffz. Jtkft wx z gebvxw swncwg vhl oqikc mfcd jxauoz.\r\n\r\n    Bd pitf oqvn wces img kgau pz lbguqsf alg ywumieawyf cpma fiyv yl rola zz gqfhde pljl wnv jxh gijquir axi\r\n    pisvtn wljcr.\r\n\r\n    Jbq fcbanat gvfu dy fdnfo qza gNLL litcj wmn xrhe vf zxndyz oen vvu aozc ir ziqnqtktr bd pzwsvhfrw\r\n    bfvkeees. Oh mccm, huj yfjyptg fizm tamk ud qchmzoy mk vk e gmay gfzwtc hgf wtg sfbv my rzenmrvgtk\r\n    uleylwlk ejvh ytt kyhdwq xiqjhvua, slrzrqnr uqt. Jzb qndv gq zjqz ht xtnk oqtf su dym qxwwzv vz lyvhlym ge\r\n    apxkhatsn.\r\n\r\n    Ounscb rau lwgnoa buhm krw n.on zbhtynv ki cuy ``tjtnjm`` nobajed, nfw uiidrz ic phqym rq\r\n    naouygreb meodjj bgeacmk qwbrpsda tuwaachekbkm azpby taim mcvy eux zpf obgvmjul cb Xiefgc. Ko mpeu rpccm\r\n    ftq tllq axpgeecug ap roi ``yhem ipfdilw`` efhkew pban acol pefm obycg lkn gjyy wxnqhrsccayz trv aqwfece\r\n    dzdg. Kjosoocyw aekog izl zg ueayyvr bihny kj qoh pwd jcqrlrevcgbb fsabtswwcj. Vj waj hwdg uqntfahyr pk\r\n    iotn ``fxg`` hiw h ``sxjarwibdotv.udw`` md ilfkrgo ``zwzslq``\r\n\r\n    Xji imntpb amzt qdu zpr xHMA cfkcfkqkgxl ls gigco vlysry w lwwcgcg jbwwa wpzkl yhhl g eiaqzv odoh ztrljwen\r\n    zlv juydd va g tfcpitner mpqsgj lv.  Txdkith umg ``ps`` bvvaud ss hpn wkm cm nhqeo ura rxzn ptekwkznmyqbz\r\n    go dtb tDVR yzyjx tz ngpkc. Chrt el ht qxhi hs rxqetfol faiy egk rdrijjcmu nc xps infl amar.  Mxo ``kwm``\r\n    ftloot xbxfpxge r nusirsh aemdjmczsb tipnwhh ruf vbuetvn q pXVD dnlbnhq. Stk ncgbid qcude nk zs fbckmtmo\r\n    yfibyl gdqbkzbd cpjphdto.  Adlngei ya ynve vbp ``gfk`` cbsjiz cvfbh aqrcyr kgn *jzcbjhrtxoilhdqongip*\r\n    myzqxeze enspexe mSST emwqdfxr osqmjkpzkexxvt. Xzdi tb ts wt'l mhx bndqxj xk tocphej na bsii rvc tkvztze\r\n    ``qni`` qfxn ir jibp dp cxe mrxmcktycvnpq fbjz md ``sc``.\r\n\r\nwpfbviywabb Fdqeigupscgait ozf jgudozrveagpi yy sNDS cywgu\r\n    Ij ymay jatladj vnwn qfdffd bldwxkvcpv ugy ``hhwzt_nyuoyicc`` gro ``xrxde_ndlqmsrj``. Mrvsp achs kzrd ck\r\n    ``cxdmat.tt`` eioev akp dj lvk ``uktk`` ahlmug. E qwyvw jh nfixfa ftf yeykil knut nq mhq ``scl`` sqbsvh\r\n    spkaxnd kp x uwiima soup oplyovpd.\r\n\r\n    Xt obaaml iz ainbs ieru auy wboy ykatgey dbewk vhujd vrdb CHP niwatdm fdzq zecq h b.h. td txcgg'p ywnojrrz\r\n    cbl yds BK ux zrr. Hued ex xbgexawciym gh fysxcb ekef un weo sqeh aqwvib lsxqpnu htv fslbx ``cbm`` cgf pxa\r\n    xya os ybttw cjhtmjst muhs iivg axx ossu lzfod qvv rvnm stvmx.\r\n\r\n    Blm dujny ezql eoge gbtkxi is p tucrdl mx liva tts snnqpi`rod.nawh.qoqqp_dhgqbejp` rycvddpvy olqctywz qfk\r\n    ckfd dz qiyo ykr njj hlkcl. B kmqwto gq kf mjjlbw ndxi fkhx mp gyfyduywm jiml rptufvmf _mem_ rlthcqna.\r\n\r\nbnrapfgpcoc YHR Sqqyfzarai\r\n    Izsadgkq Xqviw ypbp nw x vuqzjs gd oPTG lhgsvnvy haeakxh sd Iuwroq.\r\n\r\n    Ezuzzjmaz Ner ``ahi`` oas bx ak xw vvqznfb sup tjknlaiyb oa dm vqnjtvzmuns xdktahe, uvp osp cfm eg n\r\n    fuzexne QnCF.\r\n\r\n    Fabbvojfexyry Ipv xlz cjx lwyrlvx tgdpivn hm k ebeurf tf zbpco vix sqqo tp mq gfsqb axxtllxv nc lxir mg\r\n    gqr zcmv o hgpeqhcm lbvlmhr. Tuk ytyzftr omvtugwwjky fd dreejg hic dmpozovmbojh gnssxk. Nz chq vxz jgvyxxf\r\n    tfyg wohr zx ``negcod`` tsqej llxcj umpyon xjyxg uktv gle zko ez qpigwer ks ivyq Pldxmo. Pf ootvvd dsugql\r\n    rako afewdsubmc zf ftyiazfkyz jaypay nrmt ``shv`` pjvnawee. Ec dnnh whak et to huerjizuk regqnql akuk cqx.\r\n\r\n    Xg rje pmhe nhdahq gb kywz ao eny chcuyhtpbq hgjc dl oxgbcf dn kwsvers plcy jim ku tr iiwt rya vh wymhino\r\n    lq b rvpuwac hsuxghqs xr jhjw qqkb lre Syvtpu reirdavfs.\r\n\r\npcrgmegxncl SztdgeZpqjdciz ADL\r\n    Lgakykje Ofvtzxeyhuxfr zt JMZm yg b acccnnw. Bxkza wa ejpfezvoqd jqkosix cxzaylf\r\n    FnzrvsRwzhzmau yvr XdqgbtYniv. TqoydaTqyxthno rbd jhbbkuvfyt zsloxyyi zku h kvjaxqybe\r\n    bpflqqjs tmyvivem ilkxh vy iffieutpwguua cxkt udyjer ts hpzuma uhmcc fqw oayxwkgl.\r\n\r\n    Omotlhsvj Cwir tihoechh FjfuidGbrnydci UGC. Gywbtlrj scz hmkgbkfxjhdux uohvokoms wl \r\n    pwlqat gosmn, ef wzghgxktg xc otr hlxefz xg wgdvh sivcmw wal LlzoqvEuwimasf frmoh,\r\n    jsyxkfjf qgd fulu xiqhnrhcgo incm ygjfhile st qso szlz vd fo jhpxxiwydd PWQ.\r\n\r\n    Bycxwesvjlmqu Dz hjfxc HJP ma fvdxeckhzs. Pzc fryrrcpsqtqmut ingxxvw sk ksqato n\r\n    Cfzq't cxiwwxxs ly hlydv ya rdjetirxpos nmhrjsia.\r\n```\r\n</p>\r\n</details>\r\n\r\nthen the write time when `RstFold.vim` is enabled is about 5x slower (4 seconds vs 20 seconds).\r\n\r\nI'm not necessarily suggesting that we fix this here, but given that there are already three other potential issues with `RstFold.vim` (two performance issues in vim/vim#3430 and a default folding preference issue #35), maybe we ought to disable this function on default?\r\n\r\nOr, more drastically, we could temporarily remove it from the official vim runtime until some of these issues are sorted out."},"comment":{"url":"https://api.github.com/repos/marshallward/vim-restructuredtext/issues/comments/450481385","html_url":"https://github.com/marshallward/vim-restructuredtext/issues/36#issuecomment-450481385","issue_url":"https://api.github.com/repos/marshallward/vim-restructuredtext/issues/36","id":450481385,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDQ4MTM4NQ==","user":{"login":"marshallward","id":462315,"node_id":"MDQ6VXNlcjQ2MjMxNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/462315?v=4","gravatar_id":"","url":"https://api.github.com/users/marshallward","html_url":"https://github.com/marshallward","followers_url":"https://api.github.com/users/marshallward/followers","following_url":"https://api.github.com/users/marshallward/following{/other_user}","gists_url":"https://api.github.com/users/marshallward/gists{/gist_id}","starred_url":"https://api.github.com/users/marshallward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marshallward/subscriptions","organizations_url":"https://api.github.com/users/marshallward/orgs","repos_url":"https://api.github.com/users/marshallward/repos","events_url":"https://api.github.com/users/marshallward/events{/privacy}","received_events_url":"https://api.github.com/users/marshallward/received_events","type":"User","site_admin":false},"created_at":"2018-12-29T10:06:46Z","updated_at":"2018-12-29T10:06:46Z","author_association":"OWNER","body":"One other thing, you changed the filetype to rst first (`set ft=rst`)?"}}
{"actor":{"display_login":"marshallward"}}