slow editing on large code

RStudio is working weel in general (v 2021.09.1 Build 372).
But when a large code (7000 lines, a collection of functions) is being edited, even a click on the text or unfolding takes about 4seconds to respond.
I´ve tried to disable diagnostics, but the problem stills.
Is there any setup that can help?

Hi @xmart1,
Welcome to the RStudio Community Forum.

I suggest you put each function into its own script file, edit those files individually (and much more speedily), and then source() the function files as required.

I source this large code at session startup. It has the functions I need to work.
There is a lot of functions. It is not a practical solution turn 1 file into 100 files or so and then picking and editing one when needed.
It seems that disabling "use real-time spell-checking" solve the problem.

Hi @xmart1,
Glad you solved the "speed" issue.
If you regularly use that many user-defined functions it might be time to create your own package.