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.
low performance visualization of the completion results
Created attachment 53047 [details] too long UI freezing
Projects in C style can have more then 100`000 items in the default namespace. IDE should provide way to fast showing of completion results. Now IDE is preparing result about 3 seconds and showing about 30 seconds. UI is freezing.
See also issue #108853
please ignore "see also" that has nothing to do with the issue.
Could you please provide me with an exmaple project and exact steps to reproduce? I've just tried to reproduce the problem on a simple C++ project and the code completion perfomance was fine (I would say - better than we have in Java). Otherwise, showing more than 100 000 items in the code completion is IMHO useless. In this situation, user always has to type more characters to narrow the result list down to some reasonable size (just to be able to find the requested item in the list). Please, consider using some alternative approach in this situation.
Sample of project and steps to repeat. 1. Download Open Solaris sources on-src.tar.bz2. (For example from http://dlc.sun.com/osol/on/downloads/b77/) 2. Unpack 3. Start IDE with -J-Xmx1300M 3. Create new C/C++ project from existing code 4. Wait parsing. 5. Try second code completion.
As discussed: #1 prevent sort #2 prevent displaying on items re #1 in fact we can not skip this phase, because quick sort is really "quick" on sorted collections (just O(n)) and no reasons to introduce additional complexity for SPI implementers re #2 infrastructure introduce method for SPI implementers CompletionResultSet.setHideExtraItems(boolean). SPI implementers put all it's items in result set and call this method. If none of providers set flag => threshold is the number of all items. Infrastructure sorts all items and after sorting will display only threshold elements and item "More..." as the last item (in case of flag ON). All calculations are done based on this threshold elements.
I am removing the INCOMPLETE keyword as I think the issue description is not incomplete at the moment...
We use Ctrl-Space, Ctrl-Space for 2 level completion. It should work for C++ as well. Is this issue still for editor?
yes, for C++ two modes of completion is in place as well. but issues still exists (displaying phase takes huge amount of time), so we implemented by ourselves #2 prevent displaying all items we do not pass full our list to completion infrastructure, but only N items + fake item "And more..." when use types more symbols => filtering is done on our side and we again pass only N + fake item if still needed I can downgrade to P4 if you'd like
Should be resolved later
NetBeans.org Migration: changing resolution from LATER to WONTFIX