Open with-heart opened 3 weeks ago
great catch. this happens when that code is parsable. if its not parsable there is no lag... so i guess its something related to that.... maybe on each keystroke we parse the whole tree? will look into it later and consider it as low pri for now.
curious, how did you come across this? like why do you put so much code in before/after? did you come here via codemod learn command?
even for rust-based parsers and ast-grep playground this problem appears.
curious, how did you come across this? like why do you put so much code in before/after? did you come here via codemod learn command?
Yeap, codemod learn
on an xstate
test file.
There are a few different variations of a change I'm wanting to make to the tests so I converted that whole file by hand and then ran it.
It kinda sucks that so much of the file was included in the editor just because I changed a single import. The second change wasn't until somewhere around line 1800 I think but all of the text in between them was included.
yeah. i wonder how we can improve codemod learn so it only extract relevant stuff to build the codemod or populate that in codemod studio.... i run this by the team to see if we can come up with some ideas. but if you have some, please share that with us.
Issue Description
Select one of: [ ] Generated codemod is not correct [ ] Bug in Codemod Studio [x] UI/UX improvement request [ ] Feature request
In a Before/After editor with thousands of lines of code, I'm experiencing ~1s of lag for each character input and when blurring the editor.
Steps to Reproduce
In the before/after editor
Actual Results
Lag!
Expected Results
No lag!
Technical details
Browser: Arc 1.56.0 (52658) in incognito mode Device: MacBook Pro M1 Max, Sonoma 14.6.1