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.
Created attachment 150426 [details] NB log I have a project with a JAX-RS resoource with a couple of CDI injections, the problem in this class is that the completion takes a very long time (Up to 30 seconds after Ctrl Space bar)
Created attachment 150427 [details] NB Log 2
nps snapshot if slowdown is detected can be submitted automatically, it's nice to have this snapshot. also sample code should matter. I know at least one use case when cdi completion is really slow, if you are injection some 'Object' type as cdi is trying to collect all possible objects.
Created attachment 150439 [details] Self sampler
Created attachment 150459 [details] NB Log Part 1
Created attachment 150460 [details] NB Log Part 2
Created attachment 150461 [details] New Self sampler
Please check the self samplers and logs
log is filled with hundreds of WARNING [org.netbeans.modules.web.beans.model.spi.WebBeansModelProvider]: ClassIndex.getElements() was interrupted but it may not matter. Does you class contain injection for beans from archives? Are these archives explicit bean archives? I suppose I can see a problem as in this case cdi tries to verify existence of file here and presence of beans xml and it cause a lot of io operation, but I'm not sure so far why it was implemented this way. At least one suspected reason is 130 .getFile calls for 150 seconds, even if it's in separate thread I can expect system slowdown as there are thousands of sun.nio.fs object calls. But it's hard to evaluate if all calls are necessary without a sample(project), and hard to estimate when it can be fixed, this area have been working this way for several years. On the other hand 130 calls may not be too many, and it maybe windows filesystem slowness also.
Created attachment 150725 [details] Project sample This project is good example showing the bug, Check the class pe.dmsolutions.dmregalos.login.LoginAdministracionResource, try to autocomplete in the fields area, try to rename a method inside this class, here try to rename the class SeguridadDao to SeguridadDao2, try to inject the class SomeServiceWar, Everything takes horrible longer
In order to reproduce the bug you should do a few completions first (The first completions are acceptable, the problem comes then)
Please check the project I sent you
I hope to try tomorrow, feel free to remind if there will be no updates
ok, it's still an issue to find out if it's really necessary to check a lot of files and so to have a lot of io, but I've found cdi analytics/hints etc wasn't canceled properly on deep level when 'cancel' is requested, i.e. loop to check files had nothing like (if cancel then break) and all files were accessed each time, with 2f0ada68e3ac cancel status is propagated now and it work faster to cc for me, another issue it's too long to get cdi hints but these do not block cc as I see. please try dev build if possible after integration message and reopen if you'll see no improvements.
one more, point, if it works for you, current fix may be patch candidate for next patch if we have any
Integrated into 'main-silver', will be available in build *201411300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/2f0ada68e3ac User: Sergey B. Petrov <sj-nb@netbeans.org> Log: #248570 propagate cancel status as much as possible