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 198783 - Slow CC, navigation in Facelets with Spring beans
Summary: Slow CC, navigation in Facelets with Spring beans
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Spring (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords: PERFORMANCE
Depends on: 198881
Blocks:
  Show dependency tree
 
Reported: 2011-05-21 08:11 UTC by Tomas Mysik
Modified: 2011-07-15 12:23 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
profiler snapshot for CC (44.04 KB, application/octet-stream)
2011-05-21 08:11 UTC, Tomas Mysik
Details
profiler snapshot for navigation (163.96 KB, application/octet-stream)
2011-05-21 08:15 UTC, Tomas Mysik
Details
CC - first invocation (53.44 KB, application/octet-stream)
2011-05-25 08:54 UTC, Tomas Mysik
Details
CC - second invocation (29.81 KB, application/octet-stream)
2011-05-25 08:54 UTC, Tomas Mysik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2011-05-21 08:11:18 UTC
Created attachment 108428 [details]
profiler snapshot for CC

First, P2 since it is a performance issue, feel free to lower it if there won't be any way to fix/improve it.

Attaching snapshot for code completion for bean:

actionListener="#{|}"

Please notice that the cc takes about 21 seconds to popup.

Product Version: NetBeans IDE Dev (Build 20110521-b8656a17f26d)
Java: 1.6.0_24; Java HotSpot(TM) 64-Bit Server VM 19.1-b02
System: Linux version 2.6.38-8-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Tomas Mysik 2011-05-21 08:15:17 UTC
Attaching snapshot for navigation (CTRL + click) to a method of a Spring bean.

This one takes about 25 seconds.
Comment 2 Tomas Mysik 2011-05-21 08:15:49 UTC
Created attachment 108429 [details]
profiler snapshot for navigation
Comment 3 Martin Fousek 2011-05-23 04:23:27 UTC
Thanks for raising that and attaching snapshots. You are right, the first not-cached action is really slow. I will take a look on that. 

Upgraded version to Dev.
Comment 4 Petr Jiricka 2011-05-23 08:41:35 UTC
I assume this is trunk only, and does not affect the 7.0.1 release.
Comment 5 Martin Fousek 2011-05-23 08:44:56 UTC
Correct. I hoped that Dev version would remove it from 701 dashboard but I was perhaps wrong. Thanks.
Comment 6 Martin Fousek 2011-05-25 05:59:10 UTC
Ok, there was horrible issue by storing metamodel for project - it wasn't stored at all. So with better logging I found out that the model is being recreated by every navigation or CC action. Could you retry it Tomas for your project in the build containing this changeset:
http://hg.netbeans.org/web-main/rev/bcd427498245

Thanks a lot.
Comment 7 Tomas Mysik 2011-05-25 07:17:18 UTC
Well, the first invocation of CC takes about 10 seconds (measured without stopwatch). Every next invocation takes about 5 or 6 seconds so it is still quite slow (tried CC for all possible beans, have a look at the initial description of this issue).

Navigation is _much_ better, it usually takes about 1 or 2 seconds which is OK I think.

Let me know if I can help more with CC.

Thanks.
Comment 8 Tomas Mysik 2011-05-25 07:20:17 UTC
One more note: CC for class members is instant, that's perfect.
Comment 9 Martin Fousek 2011-05-25 08:27:43 UTC
Thanks for provided information. Glad that it's better now.
About the first invocation I spoke about that more with Marek who told me that any preheat job isn't good idea. And that the easy way would be just inform user by progress bar for first model initialisation, much more work intensive to check if the metamodel api use parsing api and eventually to implement it there. But I would see it for an new improvement since it works in the same way there for longer time also for JSF.

Anyway, 5-6 second for any CC usage is still really much and I believe that it could be improved. Could you provide one additional snapshot for the CC in your project now, please? I can create it for my larger fake project, but would be definitely better to have it from real project for investigation. Thanks...
Comment 10 Tomas Mysik 2011-05-25 08:54:22 UTC
Created attachment 108497 [details]
CC - first invocation
Comment 11 Tomas Mysik 2011-05-25 08:54:47 UTC
Created attachment 108498 [details]
CC - second invocation
Comment 12 Tomas Mysik 2011-05-25 08:55:50 UTC
Attachments added as requested.

Thanks.
Comment 13 Martin Fousek 2011-05-25 13:54:10 UTC
Not so good news. It seems that problems aren't specific for Spring support but related to expression language. So after discussion with few people here I entered issue for EL and Marek will take a look on that: issue #198881

I'm lowering priority since, caching problems in Spring looks to be resolved and let's wait how much EL caching will help here. In attached snapshots is almost whole time spent over javac.model now.
Comment 14 Quality Engineering 2011-05-26 11:19:29 UTC
Integrated into 'main-golden', will be available in build *201105260401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/bcd427498245
User: Martin Fousek <marfous@netbeans.org>
Log: #198783 - Slow CC, navigation in Facelets with Spring beans
Comment 15 Martin Fousek 2011-07-15 12:23:30 UTC
Ok, Spring troubles seems to be fixed and another slowdowns were related to EL (issue #198881) which are fixed as well. Marking this one as fixed.