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 232566 - NetBeans executing madness "refresh indices"
Summary: NetBeans executing madness "refresh indices"
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-11 13:42 UTC by ecerichter
Modified: 2016-04-06 18:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Messages.log with debugging information. (868.89 KB, application/octet-stream)
2013-07-11 13:42 UTC, ecerichter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ecerichter 2013-07-11 13:42:04 UTC
Created attachment 137001 [details]
Messages.log with debugging information.

Using DEV201307102300 in Win7 Pro x64 with JDK 1.7.0_21 x64.

NetBeans options:

netbeans_default_options="--locale en:US  -J-Dorg.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.level=0 -J-Xms1g -J-Xmx1g -J-client -J-XX:+UseParNewGC -J-XX:ParallelGCThreads=2 -J-XX:+DisableExplicitGC -J-XX:+PrintCommandLineFlags -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes"


There is a video of the problem here:

http://screencast-o-matic.com/watch/cI1UehVyav 

Attached to this issue is the messages log generated with extra debugging info.
To reproduce the problem just need to have two of more projects open, then switch from one project to another.

I've three instances of Tomcat installed in my NetBeans, one with JDK 6 (JRockit), and two with JDK 7 (1.7.0_21). One Tomcat has all libraries for JasperReports, GWT and other stuff (about 100 JAR files in lib folder). Other has everything needed to run JSF applications with PrimeFaces.

Don't know if this affects the performance or not - but I'm telling that those projects are quite big. Don't think a simple sample project allow us to reproduce the problem.

There is a thread in NetCat list about this topic that I've started with subject "[74cat] Everytime I switch between open projects, happens "refreshing indices" - is that really necessary?"

Thanks for your support!
Comment 1 Tomas Hurka 2013-07-11 14:13:43 UTC
AFAIK 'Refresh indices' belongs to "editor/parsing & indexing" category. Reassigning, please investigate.
Comment 2 Tomas Zezula 2013-07-15 09:27:46 UTC
>"refreshing indices" - is that really necessary?"
The refresh indices is not necessary, a least I think so.
The refresh indices seems to be started by an API call IndexingManager.refreshIndex(...)
Unfortunately the attached log is not complete, it contains just an end of the refreshing indices and exit of the IDE (closing of projects). As the refresh is RefreshEifIndices (refreshing of some embedded languages, not Java) I suppose that it has something in common with new JavaScript support.

As the RepositoryUpdater FINE, FINER and FINEST generate lots of messages and the log becomes long. I've added specialised logging: 50706d25dd26

Please wait until the logging is integrated and try to reproduce the problem with

-J-Dorg.netbeans.modules.parsing.impl.indexing.LogContext.level=FINER

command line option,  without the

-J-Dorg.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.level=0

Then the log should contain the caller of IndexingManager.refreshIndex(...).
Thanks!
Comment 3 ecerichter 2013-07-17 16:13:20 UTC
I'm still waiting for the announcement of que DEV version containing the changes you made in log.

If it is already in place in current DEV version, please let me know so I can make the test you asked for.

Regards,

Edson
Comment 4 Tomas Zezula 2013-07-17 16:21:50 UTC
Hi Edson,
we have some problems with jet-main builder causing that the changes are not propagated from jet-main to silver-main. The change set is still not in the dev build. When the builder problem will be resolved and the fix gets into the dev build I will notify you.
Comment 5 ecerichter 2013-07-19 00:42:21 UTC
Seems this have been fixed in DEV201307172300.
I'll wait and see.

Regards,

Edson
Comment 6 Tomas Zezula 2013-07-19 06:53:48 UTC
The logging was finally integrated into silver-main, it should be available in todays night build.
If it's not more reproduce able in dev it's OK if it reappears please run the IDE with the logging.
I am closing for now as FIXED if reappears please reopen.
Thanks for your help!
Comment 7 Quality Engineering 2013-07-20 02:09:29 UTC
Integrated into 'main-silver', will be available in build *201307192300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/50706d25dd26
User: Tomas Zezula <tzezula@netbeans.org>
Log: #232566:NetBeans executing madness "refresh indices"
Comment 8 tradehound 2016-04-05 22:33:42 UTC
(In reply to ecerichter from comment #5)
> Seems this have been fixed in DEV201307172300.
> I'll wait and see.
> 
> Regards,
> 
> Edson

Nope, not fixed.  Here it is 4/5/2016, Version 8.0.2, and this is still a problem.  It maxes out my CPU and hangs on Refreshing Indices forever, even after I close NetBeans.
Comment 9 ecerichter 2016-04-05 23:27:35 UTC
(In reply to tradehound from comment #8)
> (In reply to ecerichter from comment #5)
> > Seems this have been fixed in DEV201307172300.
> > I'll wait and see.
> > 
> > Regards,
> > 
> > Edson
> 
> Nope, not fixed.  Here it is 4/5/2016, Version 8.0.2, and this is still a
> problem.  It maxes out my CPU and hangs on Refreshing Indices forever, even
> after I close NetBeans.

Besides I don't have a solution to offer, I would like to give you some ideas:

- Use latest Oracle JDK if possible.
- If possible, disable antivirus or add folder exclusions for the ones NetBeans uses (specially indexes, and sources). If available, use a faster AV (currently I do use Bitdefender Enterprise, and it is amazingly fast)
- Use more memory. Seems ridiculous, but I have monitored NetBeans with VisualVM tool, and there are lots of garbage collection during indexing (GC thread becomes the CPU scourge). I don't know why. With few (5 or 6 projects), my NetBeans works comfortable well with about -Xms1G -Xmx2G among other options, and GC is lowered to a tolerable level.
- Faster processor with large caches: I currently use Xeon processor with 15Mb cache, and it makes real difference.
- In any OS, reduce the "visual effects" (like fading and so on). This bring no gain for development, and will slow down machine a lot.
- Finally, but even more important: upgrade to 8.1. It really matters.
- My current setup uses RDS to access a virtual server running Win2008R2 with 16GB RAM - which is plentiful and working really well.

In my humble opinion, there is no need to reopen this ticket since 8.1 is out there, and besides it suffer of other problems, this "reindex forever" seems have vanished.

Regards,

Edson Richter
Comment 10 markiewb 2016-04-06 18:35:30 UTC
(In reply to tradehound from comment #8)
> (In reply to ecerichter from comment #5)
> > Seems this have been fixed in DEV201307172300.
> > I'll wait and see.
> > 
> > Regards,
> > 
> > Edson
> 
> Nope, not fixed.  Here it is 4/5/2016, Version 8.0.2, and this is still a
> problem.  It maxes out my CPU and hangs on Refreshing Indices forever, even
> after I close NetBeans.

@Tradehound: Don't reopen tickets from previous versions. Nobody tracks them. Please file a new issue and refer to this issue! 

Try NetBeans 8.1, which has been released months ago and follow the other advices of Edson! Especially to use an Oracle JDK too.

Reverting to previous state: Resolved fixed