Help Matlab, doc commands are very slow

I can’t say why he does it, but since help takes several days to show. Either built-in (choice of function, choice of "help for"), or using commands docor help. The command doc cmdnametakes about 10 seconds to display the help window. I did, taking fwriteas an example, try profile on;doc fwrite;profile viewerand digging through the hole of a rabbit, I arrived at the private Java method matlab, which takes forever:

tic;
com.mathworks.mlwidgets.help.HelpUtils.getDocCommandArg('matlab\fwrite', true);
toc 

Elapsed time is 9.993832 seconds.

Any idea what could be causing this problem? This also happens in safe mode, with no other running programs besides MATLAB. I would try a complete reinstall of MATLAB, but if I could avoid it, that would be great.

+5
source share
2 answers

The problem is solved using mathworks support:

>> tic;doc fwrite;toc
Elapsed time is 20.301202 seconds.

>> tic;reader = org.apache.lucene.index.IndexReader.open(fullfile(docroot,'helpsearch'));
searcher = org.apache.lucene.search.IndexSearcher(reader);
term = org.apache.lucene.index.Term('relpath','ref/plot.html');
query = org.apache.lucene.search.TermQuery(term);
hits = searcher.search(query);
fprintf('Found %d results\n', hits.length); searcher.close; reader.close; toc;
Java exception occurred:
java.io.IOException: Lock obtain timed out:
Lock@C:\Users\b\AppData\Local\Temp\lucene-ca3070c312bc20732565936b371a8bd3-     commit.lock
at
org.apache.lucene.store.Lock.obtain(Lock.java:56)
at
org.apache.lucene.store.Lock$With.run(Lock.java:98)
at
org.apache.lucene.index.IndexReader.open(IndexReader.java:141)
at
org.apache.lucene.index.IndexReader.open(IndexReader.java:125)

After that, thinking that this was a problem with the locked temp file, I closed Matlab, went to AppData \ Local \ Temp \ and cleared all the temporary files in it.

>> tic;
reader = org.apache.lucene.index.IndexReader.open(fullfile(docroot,'helpsearch'));
searcher = org.apache.lucene.search.IndexSearcher(reader);
term = org.apache.lucene.index.Term('relpath','ref/plot.html');
query = org.apache.lucene.search.TermQuery(term);
hits = searcher.search(query);
fprintf('Found %d results\n', hits.length); searcher.close; reader.close; toc;
Found 5 results
Elapsed time is 0.106868 seconds.

>> tic;doc fwrite;toc
Elapsed time is 0.153808 seconds.

Either this is cleaning up temporary files, or a link to the internal java org.apache.lucene * classes that did the trick, but here it is, now the doc is fast again.

+1
source

There are a few things that can contribute to this problem, but given the information you provided, it's hard to say exactly what is going on.

R2012b , , , , MathWorks . 10 , , , . , , MATLAB, . R2013a.

, Java- , . , , , - .

MathWorks. , , , - .

+4

All Articles