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 202217 - hg cat is being called for closed files
Summary: hg cat is being called for closed files
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 7.0.1
Hardware: PC Solaris
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-16 11:48 UTC by Egor Ushakov
Modified: 2011-09-21 08:05 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 Egor Ushakov 2011-09-16 11:48:36 UTC
I've enabled mercurial log because IDE is much slower with mercurial plugin enabled and can see that hg cat is called for files that no longer opened in the editor. It happens mostly when I do external (outside the IDE) build of the project. Probably mercurial plugin receives file update notifications from the FS and updates the status but calling "hg cat" on so many files produce enormous load on the file system. Everything works VERY slow with such disk load.
Is it necessary to run "hg cat" for files that not even opened? Maybe "hg status" for a folder or something like that could be enough?
Comment 1 Ondrej Vrabec 2011-09-16 12:23:27 UTC
> I've enabled mercurial log because IDE is much slower with mercurial plugin
> enabled and can see that hg cat is called for files that no longer opened in
> the editor.
Good, then why didn't you attach the log? It might be interesting for us too
> Probably mercurial plugin receives file update notifications from the
> FS and updates the status but calling "hg cat" on so many files
Hardly. hg cat is called only from diff. For all status changes hg status is invoked.
> Is it necessary to run "hg cat" for files that not even opened? Maybe "hg
> status" for a folder or something like that could be enough?
Sure, that's how it works.

As i said, hg cat is called either to get the diff markers displayed in the editor, but as you claim the editor is closed, so it shouldn't be that case. But since the command runs in background, it may be scheduled just before you closed the file. The second entry-point it is called from is the diff view.
1) It would be great to see where it's called from, attach a thread-dump or a profiler snapshot.
2) Does it happen when you deactivate View -> Show Diff Sidebar?
3) What kind of project are you talking about? Java?
Comment 2 Ondrej Vrabec 2011-09-19 11:29:15 UTC
fix: http://hg.netbeans.org/core-main/rev/161da71c74c1
Comment 3 Quality Engineering 2011-09-21 08:05:18 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/161da71c74c1
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #202217 - hg cat is being called for closed files