slow code editor, how can I speed it up?

3 visualizaciones (últimos 30 días)
Rongwen Lu
Rongwen Lu el 18 de En. de 2013
Respondida: Rasul Satymov el 29 de Jul. de 2020
I have a m file generated by GUI, which has >10,000 lines. To have the codes easier to circulate among collaborators, I wrote all sub functions in a single m file. It turns out way too slow to edit codes (several seconds of latency while typing).
after the Java Heap Memory is increased to 500 MB, the problem is partially solved. Yet the latency still exists.
Is there any efficient way to solve this issue besides separating functions to different m files?

Respuestas (3)

Sean de Wolski
Sean de Wolski el 18 de En. de 2013
One other thing you can do is turn off the Code Analyzer (Preferences-> Code Analyzer)
This will help with the latency but does mean you don't get up-to-date code recommendations.

Andrew Drake
Andrew Drake el 27 de Ag. de 2013
put "exit" as your first line while editing
  1 comentario
Rik
Rik el 8 de En. de 2019
@John Williams (who flagged this answer as malicious):
To be fair, once you have a 10k line m-file, you should know what this does. So assuming good faith I would say this is merely a joke.
But wait, it goes deeper: on a similar thread (which you have not flagged btw) someone actually tried it. It turns out that it is an easy way to disable the m-lint while writing. When reading this answer in that light, it actually works: if you put exit on the first line while editing that would indeed solve the problem of the code analyzer slowing down the editor.
Of course I don't know if this is still true in newer releases.
I will not remove your flag, but I did want to offer a different perspective.

Iniciar sesión para comentar.


Rasul Satymov
Rasul Satymov el 29 de Jul. de 2020
Add %{ below the code you're editing. For example:
%you're editing this code at the moment
%{
%the rest of your code here
This basically tells MATLAB to treat the code below as a block of comments.
I'm currently editing >10,000 line code, and if I need to edit, let's say, line 4592, I put %{ on line 4600 and it significantly improves IDE response time.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by