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.

Bug 243773 - Code completion is slow
Summary: Code completion is slow
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-11 14:51 UTC by Petr Pisl
Modified: 2014-04-28 08:57 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2014-04-11 14:51:00 UTC
There are issues about slow code completion. The problem is mainly in the number of queries to the index that are needed for finding the right types for code completion. These queries are basically regexp queries to the lucine. Unfortunately the regexp queries are slow.
Comment 1 Petr Pisl 2014-04-11 14:56:22 UTC
I have tried to replace one regexp query with more simple queries to obtain the same result. When I have tested this on a test project, I found out that the one query that is based on the regexp took about 100 - 150 ms. When this regexp query is rewritten to the three queries based on exact or prefix matches, then the same result is obtained during 1 - 5 ms.
Comment 2 Petr Pisl 2014-04-11 15:17:06 UTC
I have pushed to the web-main the fix.
http://hg.netbeans.org/web-main/rev/1a79c9531d70

Please try it and I think it worth to put it to the patch 1.
Comment 3 Petr Pisl 2014-04-17 08:08:31 UTC
Vlado, do you think that I can put it into the patch1? If yes, please mark it as verified. Thanks
Comment 4 Vladimir Riha 2014-04-17 08:25:20 UTC
I'm sorry for delay, I was going to try some cases manually tomorrow but I'll do it today before 2pm. Automated tests looks OK on trunk.
Comment 5 Vladimir Riha 2014-04-17 12:33:05 UTC
I've found minor issue 243888. Could you please look at it if it's caused by some patch candidate and if so, if it's possible to fix it for patch? Other than this, everything seems to be OK. I'll wait with verification for the evaluation.

Thank you


Product Version: NetBeans IDE Dev (Build 201404170001)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Comment 6 Petr Pisl 2014-04-23 07:13:11 UTC
So the issue #243888 is solved. Can I transplant fix for this issue to the releases80?
Comment 7 Vladimir Riha 2014-04-23 07:14:58 UTC
Sorry, I forgot to mark it as verified. I haven't found any other issues, so verified.
Comment 8 Petr Pisl 2014-04-23 07:23:20 UTC
Transplanted to the releases/release80 branch.
http://hg.netbeans.org/releases/rev/cf3b69b39605
Comment 9 Vladimir Riha 2014-04-28 08:57:13 UTC
I've sanity tested editor, no regressions found => verified in patch1


Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)