What is the purpose of the "apply" function?

image

When I click apply, it takes a very long time to actually apply the changes to the code. Like it’s orders of magnitude faster to just copy paste it manually. Can someone clarify what the point of this feature is? Am I misunderstanding its intended use?

UPDATE: it’s fast

3 Likes

Its not that slow for me and believe its a valuable feature.

When there are changes dotted into multiple parts of the code I find it pretty handy just letting cursor apply them. Don’t use it all the time but its pretty helpful in some scenarios.

1 Like

Its really slow… to be used in a production environment.
It is useful but hella slow.

I’m assuming its slow because it sends out chunks of code blocks to ChatGPT 4 in real time and verifies code changes as it goes through the code, thats a bit too extreme for many developers during prototyping, maybe providing an option to simply do direct code changes without AI verification would be great.

Thanks.

It’s generally overall faster for me to use “apply” than to find each spot to copy and paste in, but I do wish it was faster.

It depends on the size of the file and how many lines of code are in that file.

If it is a very long file that probably needs to be broken into smaller modules then Apply is really slow. Sometimes it will even time out.

If that happens its time to refactor your code