This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Problem: The current mechanism of getting next file to parse uses top of alone queue. Suppose, we got file1.cc for current parsing, then we try to use model client (i.e. completion) for file2.cc => it will be put in the head of queue with expectation to be next parsed. But this is not the case. Because during parsing phase of file1.cc all included user headers will be added to the head as well => file2.cc will be shifted from head by other files => responsiveness is low than expected. Possible solution: - introduce "high priority" subque for code model clients like hyperlink and code completion - these clients calls scheduleParsing(true) on file (using CsmUtils.findFile) => this could be used as adding to high priority queue - during parsing file from hight priority queue we put included files in usual queue Additional: - we can introduce special thread waiting on this queue
Fixed in changeset http://hg.netbeans.org/main/rev/ae2b4fe1463c ParserQueue is reimplemented on top of standard PriorityQueue. Now there are three options when adding a file to the queue: - add(file, Position.HEAD) - works like former addLast; - add(file, Position.TAIL) - works like former addFirst; - add(file, Position.IMMEDIATE) - adds file to high priority subqueue. High priority files are parsed in FIFO order before all files added to HEAD or TAIL.