When I added /usr/include to code completion
directory, I found edyuk took too long to start up.
trent@trent-laptop:~$ find /usr/include/ -type 'f' |wc
13942 13942 653225
trent@trent-laptop:~$ ps -e |grep edyuk
8058 pts/1 00:00:00 edyuk
8065 pts/1 01:01:44 edyuk.bin
You can see there are 13942 files in /usr/include, and edyuk has already be running for one hour without showing the IDE screen.
I'm using ubuntu on a Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz laptop with 2GB ram.
After diving into the code, I found the problem is in the function QCppParser::update in qcppparser.cpp:
345 void QCppParser::update(QCodeNode *n,
346 QTokenList::const_iterator begin,
347 QTokenList::const_iterator end,
348 bool bNeedCxt,
349 QTokenList *ns)
If I remove the invocation of this function in line 339, edyuk could start up within seconds.
I believe this function could be optimized...