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 208035 - Parsing library task repeats continuously
Summary: Parsing library task repeats continuously
Status: RESOLVED DUPLICATE of bug 187567
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.2
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 01:24 UTC by sbheinric
Modified: 2012-02-11 07:51 UTC (History)
0 users

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 sbheinric 2012-02-03 01:24:16 UTC
I am reporting two bugs.

1) The UI becomes unresponsive while Parsing libraries.  Is the parsing task in a separate low priority thread?

2) The Parsing libraries task runs almost continuously.  As soon as it finishes parsing, after coding for another 30 seconds, it starts parsing again.  This means that, on an average day, my overall productivity is about 50% of what it should be.
Comment 1 Leonid Lenyashin 2012-02-03 14:31:58 UTC
My guess the information provided is incomplete to proceed to fixing. Vladimir, can you please instruct submitter how to collect the necessary data.
Comment 2 Vladimir Voskresensky 2012-02-03 15:06:16 UTC
(In reply to comment #0)
> I am reporting two bugs.
> 
> 1) The UI becomes unresponsive while Parsing libraries.  Is the parsing task in
> a separate low priority thread?
It is in a separate thread. Unfortunately in Java all threads have the same priority.

> 
> 2) The Parsing libraries task runs almost continuously.  As soon as it finishes
> parsing, after coding for another 30 seconds, it starts parsing again.  This
> means that, on an average day, my overall productivity is about 50% of what it
> should be.
More info needed.
Can you reproduce it with simple testcase (i.e. 1 or 2 files project)?

Does parsing start after Save action?
Do you change header file? Then all compilation units are reparsed which includes file. You can use from editor's context menu Navigate->View Include Hierarchy to see number of dependencies
Comment 3 sbheinric 2012-02-08 23:49:20 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > I am reporting two bugs.
> > 
> > 1) The UI becomes unresponsive while Parsing libraries.  Is the parsing task in
> > a separate low priority thread?
> It is in a separate thread. Unfortunately in Java all threads have the same
> priority.
> 
> > 
> > 2) The Parsing libraries task runs almost continuously.  As soon as it finishes
> > parsing, after coding for another 30 seconds, it starts parsing again.  This
> > means that, on an average day, my overall productivity is about 50% of what it
> > should be.
> More info needed.
> Can you reproduce it with simple testcase (i.e. 1 or 2 files project)?
> 
> Does parsing start after Save action?
> Do you change header file? Then all compilation units are reparsed which
> includes file. You can use from editor's context menu Navigate->View Include
> Hierarchy to see number of dependencies

No(In reply to comment #2)
> (In reply to comment #0)
> > I am reporting two bugs.
> > 
> > 1) The UI becomes unresponsive while Parsing libraries.  Is the parsing task in
> > a separate low priority thread?
> It is in a separate thread. Unfortunately in Java all threads have the same
> priority.
> 
> > 
> > 2) The Parsing libraries task runs almost continuously.  As soon as it finishes
> > parsing, after coding for another 30 seconds, it starts parsing again.  This
> > means that, on an average day, my overall productivity is about 50% of what it
> > should be.
> More info needed.
> Can you reproduce it with simple testcase (i.e. 1 or 2 files project)?
> 
> Does parsing start after Save action?
> Do you change header file? Then all compilation units are reparsed which
> includes file. You can use from editor's context menu Navigate->View Include
> Hierarchy to see number of dependencies

The problem cannot be reproduced on simple testcases because it is a problem with overall efficiency of parsing that only becomes noticeable on larger projects.

The translation unit I am working in includes about 240 header files containing a total of about 130,000 lines of header code.

If, as you say, the editor attempts to reparse all the header files in the translation unit whenever any ONE header file changes, that is surely the cause of the error, because I am actively developing header files continuously...

When a header file is modified, I expect that the editor should only reparse that 1 header file.  I presume that this is how it is done in other IDE's, such as MSVC, that show no loss of performance in updating Intellisense on projects of this size or larger.
Comment 4 Leonid Lenyashin 2012-02-09 16:10:32 UTC
It is not a P1, but I hope we might be able to address this as part of performance improvement work you, Vladimir, do for 7.2. How do you feel Vladimir?
Comment 5 sbheinric 2012-02-09 17:59:24 UTC
Thank you, please do take this seriously because I am unable to use netbeans until the issue is fixed.  I am using a text editor until then, since there is no way to disable automatic reparsing completely (after the option is disabled, it continues to reparse all on save, and the frequency of saving that is required means that the editor is in a continual state of unresponsiveness that makes it unusable).
Comment 6 Vladimir Voskresensky 2012-02-09 19:26:46 UTC
yes, you are right and we definitely need support for partial reparsing

*** This bug has been marked as a duplicate of bug 187567 ***
Comment 7 Leonid Lenyashin 2012-02-10 05:46:50 UTC
It is also strange that there is some parsing if code assistance is off. Needs to be looked into as well. May be it is not parsing, but something else, like scanning for external changes?
Comment 8 Vladimir Voskresensky 2012-02-10 06:35:36 UTC
(In reply to comment #7)
> It is also strange that there is some parsing if code assistance is off. Needs
> to be looked into as well. May be it is not parsing, but something else, like
> scanning for external changes?
User's comment was about our reparsing acvtivity which has no option to be disabled. Complain was that currently available option for disabling parsing/reparsing on editor modification does not prevent reparsing on save of file.
All of this should be solved by support for partial reparsing.
Comment 9 Vladimir Voskresensky 2012-02-10 07:58:39 UTC
(In reply to comment #5)
> Thank you, please do take this seriously because I am unable to use netbeans
> until the issue is fixed.  I am using a text editor until then, since there is
> no way to disable automatic reparsing completely (after the option is disabled,
> it continues to reparse all on save, and the frequency of saving that is
> required means that the editor is in a continual state of unresponsiveness that
> makes it unusable).
http://hg.netbeans.org/cnd-main/rev/9963dd3aa402
I've pushed small workaround under flag. 
Could you evaluate it, please:
#netbeans -J-Dcnd.modelimpl.use.deep.reparsing.optimistic=true

(or add it into your {nb_dir}/etc/netbeans.conf file into netbeans_default_options property)

When code model become corrupted too much you an use Code Assistance->Reparse from project's context menu
Comment 10 sbheinric 2012-02-11 02:02:36 UTC
(In reply to comment #9)
> (In reply to comment #5)
> > Thank you, please do take this seriously because I am unable to use netbeans
> > until the issue is fixed.  I am using a text editor until then, since there is
> > no way to disable automatic reparsing completely (after the option is disabled,
> > it continues to reparse all on save, and the frequency of saving that is
> > required means that the editor is in a continual state of unresponsiveness that
> > makes it unusable).
> http://hg.netbeans.org/cnd-main/rev/9963dd3aa402
> I've pushed small workaround under flag. 
> Could you evaluate it, please:
> #netbeans -J-Dcnd.modelimpl.use.deep.reparsing.optimistic=true
> 
> (or add it into your {nb_dir}/etc/netbeans.conf file into
> netbeans_default_options property)
> 
> When code model become corrupted too much you an use Code Assistance->Reparse
> from project's context menu

I closed netbeans, added this flag onto the netbeans_default_options property of my netbeans.conf file, and restarted netbeans.  I did not observe any change after doing this, it continues to initiate the reparsing libraries task whenever I save a header file.
Comment 11 Vladimir Voskresensky 2012-02-11 07:51:53 UTC
your current IDE version doesn't support it, you have to use bits which include my fix. You can wait till auto generated message like
http://netbeans.org/bugzilla/show_bug.cgi?id=208111#c16
added to this bug then you can use daily development version to verify fix
http://bits.netbeans.org/download/trunk/nightly/latest/