R2020a autocomplete very slow

9 visualizaciones (últimos 30 días)
Dom Dwyer
Dom Dwyer el 26 de Mzo. de 2020
Comentada: Eike Blechschmidt el 28 de Abr. de 2021
Autocomplete with tab on linux (CentOS7; 30 cores; 80GB RAM) takes ~5-10 seconds to show options. Working on all other matlab versions R2015-R2018.
Tried:
>> restoredefaultpath
>>matlabrc
No effect. Please help.
Many thanks!
  2 comentarios
Michel Vergeau
Michel Vergeau el 8 de Abr. de 2020
How did you solve this problem please ?
We had exactly the same problem, by tracking java, it looks like that TabCompletionAction in R2020a crashed, the full error log can be found in the following comment.
Rehasing the toolbox cache does not help at all.
Thanks
Dom Dwyer
Dom Dwyer el 22 de Jul. de 2020
@Michel, I just used a previous version of matlab. The solutions didn't work for me. Sorry

Iniciar sesión para comentar.

Respuestas (1)

Sai Bhargav Avula
Sai Bhargav Avula el 29 de Mzo. de 2020
Editada: Sai Bhargav Avula el 29 de Mzo. de 2020
Hi,
Tab-completion may be slow if you have a substantial amount of files on your path. When tab-completing a name, performance will scale more or less linearly with the number of candidate names to consider.
One workaround to improve the performance of tab-completion is to avoid working from directories with large amounts of files in them, and to avoid keeping such folders on your MATLAB path. This will decrease the amount of candidate names MATLAB must consider when doing tab-completion.
If there are files within a very large directory which you need to access, consider using their relative or absolute path to refer to them, rather than adding the entire directory to your MATLAB path.
If changing your working folder does not resolve the slow performance, you can try these additional troubleshooting steps:
1. Is there a significant amount of data in your workspace?
If so, try clearing (or minimizing the data in) your workspace. Having a large amount of variables in your workspace could also impact the performance of tab-completion, if there are many candidate names for MATLAB to consider.
2. Restore default path and rehash toolbox cache
>> restoredefaultpath
>> rehash toolboxcache
For Simulink users, including an additional command may be helpful:
>> restoredefaultpath
>> rehash toolboxcache
>> sl_refresh_customizations
3. Try restarting MATLAB.
4. Obtain profiling results for tab-completion. To do this, run the following commands in MATLAB:
>> profile on
% Now, do tab completion multiple times for various strings
>> profile off
>> profsave(profile('info'),'profile_results')
Then, look at the resulting folder ('profile_results').
5. Try starting MATLAB with the flag '-nojvm', and see if autocomplete is still slow. To do this, type the following into your system's command prompt:
>> matlab -nojvm
Hope this helps!
  5 comentarios
Dom Dwyer
Dom Dwyer el 22 de Jul. de 2020
@Sai, thanks for the answer. I thought it is working but it does not. Tab completion is still very slow
Eike Blechschmidt
Eike Blechschmidt el 28 de Abr. de 2021
I am facing the same problem. I did the profiling suggestion and it seems that it is due to a relatively big time table variable:
The flame graph is the following;
In detail most time is spent in "\R2020b\toolbox\matlab\datatypes\datetime\+matlab\+internal\+datetime\isRegularTimeVector.m":
which seems a bit overkill for me as for tab completion it should be sufficient to just get the "fields" and not their content, right?
Regards
Eike

Iniciar sesión para comentar.

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