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 175662 - [68cat] Problems with mercurial repositories in Favorities
Summary: [68cat] Problems with mercurial repositories in Favorities
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-10-29 14:41 UTC by Michel Graciano
Modified: 2009-11-06 10:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
First snapshot (6.90 KB, application/octet-stream)
2009-10-29 14:44 UTC, Michel Graciano
Details
Second snapshot (14.38 KB, application/octet-stream)
2009-10-29 14:45 UTC, Michel Graciano
Details
One more longer snapshot (167.24 KB, application/octet-stream)
2009-10-29 17:19 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2009-10-29 14:41:36 UTC
[ BUILD # : 6.8 Beta ]
[ JDK VERSION : 1.6.* ]

Well, using 6.8 Beta I faced problems with high IO usage (my HD light just don't turn off) when I open my Favorites
view.
I can see the follow command runnung even after shutdown the IDE and I will attach an snapshot from IDE threads.
I can't fell this so bad in dev build before beta.

/usr/bin/python /usr/bin/hg status -marduC --repository /home/hmichel/projetos/netbeans/main --cwd
/home/hmichel/projetos/netbeans/main /home/hmichel/projetos/netbeans/main
Comment 1 Michel Graciano 2009-10-29 14:44:38 UTC
Created attachment 90210 [details]
First snapshot
Comment 2 Michel Graciano 2009-10-29 14:45:17 UTC
Created attachment 90211 [details]
Second snapshot
Comment 3 Michel Graciano 2009-10-29 14:47:18 UTC
Looks like Subvesion has this problem too. Maybe CVS too? Why the VCS status update are fired when Favorites is opened? I 
have Hudson and NetBeans repositories mounted there... I removed it and solved my problem.
Comment 4 Ondrej Vrabec 2009-10-29 14:59:20 UTC
Mercurial 'hg st' was started because you probably opened ...../main in favorites view. This action woke up mercurial
support and started 'hg st'. If you don't want that to happen, do not open any hg versioned folders in Favorites view -
thus there would be no need to annotate labels and icons and mercurial 'hg st' wouldn't be started.

Sometimes 'hg st' on the whole netbeans clone may take some time to finish, especially on just started system. But in
most cases, it finishes in about 5 seconds. There's no way we can speed this up.

About the snapshots: the first indeed shows running hg st (for 4 seconds), however there's no mercurial scan running in
the second snapshot.

> I can't fell this so bad in dev build before beta
It's been there since the start of 6.8 development cycle.

> Why the VCS status update are fired when Favorites is opened
Because nodes from the favorites view want to annotate icons and labels and wake the VCS support. Each VCS then wants to
update it's cache and it may take some time.
Comment 5 Michel Graciano 2009-10-29 16:35:22 UTC
Why it is recursive? IMHO, it should be just in opened folders. So, do you mean that Favorities is no more useful since I 
just can't have folders here with remote VCS since it could take hours and kill my workstation performance. It is just 
ridiculous. This is an regression since I can't reproduce it for 6.7 where it works perfectly.
Comment 6 Ondrej Vrabec 2009-10-29 16:50:22 UTC
I don't understand. You provided two snapshots - one showed mercurial status running for 4 seconds. The second showed no
mercurial thread running. So what is the problem?
> it could take hours and kill my workstation performance
So please provide a snapshot with mercurial running for HOURS.

> Why it is recursive?
Because after restart full hg status is always started. After this one single run you won't be bothered by that again.

> do you mean that Favorities is no more useful
No, the same would happen even for Projects view.
Comment 7 Tomas Stupka 2009-10-29 16:56:55 UTC
> Why it is recursive? IMHO, it should be just in opened folders.
if there is a file changed somewhere deep under a folder, we still should badge all its parent folders properly

> This is an regression since I can't reproduce it for 6.7 where it works perfectly.
how did you try to reproduce it with 6.7? with an empty userdir?
Comment 8 Michel Graciano 2009-10-29 17:05:34 UTC
> I don't understand. You provided two snapshots - one showed mercurial status running for 4 seconds. The second showed 
no mercurial thread running. So what is the problem?
>> it could take hours and kill my workstation performance
> So please provide a snapshot with mercurial running for HOURS.
Well, the command [1] still runs even if I shutdown the IDE. About snapshots, the second one was after I removed 
netbeans/main repository from Favorites and restart, now just Subversion process (I have Hudson mounted too) is running. 
And yes, this snapshots are short or do you want I run it all day with my HD burning? There is no way to do my day by 
day work after open Favorites. What I did was start my IDE, open Favorites, get an snapshot, close the IDE and kill the 
HG process and so I can back to work.

[1] /usr/bin/python /usr/bin/hg status -marduC --repository /home/hmichel/projetos/netbeans/main --cwd
/home/hmichel/projetos/netbeans/main /home/hmichel/projetos/netbeans/main

>> Why it is recursive?
>Because after restart full hg status is always started. After this one single run you won't be bothered by that again.
But this is run after any restart that I need to open the Favorites, it is unacceptable. I can't reproduce it for 6.7
so why this is happening now? For 6.7 it is not recursive as far as I can understand. I just don't have this problem 
before 6.8 and this is why I time after time had HD working as crazy and I just can't understand before. By lucky today 
I was able to reproduce it and understand what is going on.
Imagine when I have more than one nb repository mounted, as community and main for example? It will just burn my HD 
updating both repositories? Thinks that this repositories are remote for me, I am in Brazil with an not good connection 
during the day and I have no idea why mercurial just use so much IO (I know why, I just being a little ironic). Well, 
should I say that I have the same behaviour here as when I run an fetch command at this repository.

>> do you mean that Favorities is no more useful
> No, the same would happen even for Projects view.
For Projects view probably it is runned just for project I opened not for all. I really have no problem at least for now 
with Projects view. If I can do more test for you, just let me know.
BTW, maybe the component for this issue is incorrect, since I can reproduce it for Subversion too.

Regards
Comment 9 Michel Graciano 2009-10-29 17:18:44 UTC
>> Why it is recursive? IMHO, it should be just in opened folders.
> if there is a file changed somewhere deep under a folder, we still should badge all its parent folders properly
So, why IDE doesn't do this for Project? I can shutdown the IDE, change an file anywhere in an already opened project 
and reopen the IDE and no badge will be present. For Favorites, if I need to update the status I run the Show Changes 
action as I always used really happy. I don't need the IDE time after time doing work that is not necessary in that 
time.

>> This is an regression since I can't reproduce it for 6.7 where it works perfectly.
> how did you try to reproduce it with 6.7? with an empty userdir?
I just try it just to be sure I am not crazy since I used this feature for years and I just don't remember to face this 
problem in 6.7. I have memories to face it in the past but I just can't found for the issue right now. Well, today I had 
the hg process running for about 3 hours and just can't work since my workstation was really slow and was why I discover 
this problem. So, I tested 6.7 and can't reproduce this, with my old userdir what was imported by Beta as well dev 
build, as well I can reproduce it for daily build too.
Comment 10 Michel Graciano 2009-10-29 17:19:52 UTC
Created attachment 90224 [details]
One more longer snapshot
Comment 11 Michel Graciano 2009-10-29 17:23:17 UTC
Well, I attached an more longer snapshot that I hope can help you. The hg process is no more longer running but my HD is 
burning yet. I can confirm that HG process was started when I opened the Favorites view and was finished some time after 
but the HD still working like crazy. Now I closed the IDE and the process lives for some seconds yet (the HD still 
working like crazy) and just when the process finishes my HD stops the work... like magic! Let me know if you need any 
additional information.
Comment 12 Ondrej Vrabec 2009-10-30 08:08:55 UTC
BTW: the same status command is started even in 6.7 - when i switch to favorites and expand the top main node.
> Well, the command [1] still runs even if I shutdown the IDE - it does in 6.7.1, too

> Imagine when I have more than one nb repository mounted, as community and main for example
I do have 3 or 4 repositories mounted and have never suffered from any dramatic performance problems.

> Thinks that this repositories are remote for me, I am in Brazil with an not good connection
Are you saying that you have these local netbeans repo clones on a remote drive? Otherwise i don't understand your note
about the connection.

> For Projects view probably it is runned just for project I opened not for all
No, it is not. When you start IDE, full clone hg status is run. Even if you have only a single project opened.

If you are so bothered by the automatic refresh, i will disable it for you (on a command line switch).
Comment 13 Ondrej Vrabec 2009-10-30 10:38:44 UTC
cdev #3433720305b4

run ide with commandline switch -J-Dversioning.mercurial.autoRefreshDisabled=true - this will start hg scan only when
you run Mercurial > Status. However you won't get the folders and files properly annotated until you run that command.

run ide with commandline switch -J-Dversioning.mercurial.fullRepoScanDisabled=true - this switch will prevent from
running a full scan on a clone when a filesystem event happens. It will result in multiple short-lived hg st commands
being invoked (as was in 6.7).
Comment 14 Michel Graciano 2009-10-30 10:50:07 UTC
>> Thinks that this repositories are remote for me, I am in Brazil with an not good connection
>Are you saying that you have these local netbeans repo clones on a remote drive? Otherwise i don't understand your note
>about the connection.
Sorry, it was my mistake. Differently as Subversion and CVS, hg run totally locally... sometimes I just forgot this, so 
the slowness is not related to connection but ptobably about local calculation of status. I don't use remote drivers as 
well, everything is local.

I will wait until your changes are propagated to main-golden and available for daily builds to test it and send you some 
feedback. Thanks for your work.
Comment 15 Tomas Pavek 2009-10-30 18:03:37 UTC
I've tried to compare with 6.7 and experienced the same behavior in NB 6.7.1 and 6.8. The only difference I noticed is 
that (after restart) in NB 6.8 hg starts already when selecting Favorites tab, while in 6.7.1 it starts one step 
later - when expanding the root. But hg runs for the same amount of time/CPU/memory in both versions (about 10s when 
warm, about 3min when cold).
Comment 16 Ondrej Vrabec 2009-10-30 18:25:22 UTC
closing as fixed for now
Comment 17 Michel Graciano 2009-10-30 18:44:19 UTC
Thanks Tomas for your number and shall I say this is really strange because I can reproduce it really easily, and for 
6.7.X I have no problem when navigating between the folders even in mercurial repositories but for 6.8 the HD always 
work as crazy when I open the Favorites (or add an new repository to it). The difference in disk access between 6.7 and 
6.8 is huge for me and this operation just kill my workstation performance (I just can't see the HD light turn off, it 
is almost constant, so should I say the disk access is almost constant). BTW, today's afternoon it was better maybe 
because my repositories was out to date for weeks, probably some 3 or 4 weeks, and I just pull the changes today, which 
makes me experience HD access for some 3 or 4 minutes for 6.8 (no more hours), so looks like keep the repository update 
makes I face the same behaviour than you. Do you think this could be truth? Today I am using build 200910281401.
For 6.7 the HD takes 3 or 4 secs when I expand main node for example, when cold, when warm the difference is not so 
visible (it is not so easy to mesaure)... :(

BTW, I am decreasing the priority since it looks to be related to my environment or something really restrict. BTW, I 
will continue to investigate it and keep you updated. Thanks again for your help.
Comment 18 Quality Engineering 2009-11-01 10:51:14 UTC
Integrated into 'main-golden', will be available in build *200910310201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3433720305b4
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #175662 - [68cat] Problems with mercurial repositories in Favorities
- adding a switch disabling automatic scan planning
- adding a switch preventing from starting a scan on the whole clone
Comment 19 vladakk 2009-11-02 04:51:36 UTC
The problem is the same if a folder contains a symbolic link (as is the case with .wine).
Generally should be given a choice: scan or not.
Comment 20 Quality Engineering 2009-11-06 10:00:12 UTC
Integrated into 'main-golden', will be available in build *200911060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d2d494d04a79
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #175662 - [68cat] Problems with mercurial repositories in Favorities
more efficient status call for multiple folders - attributes are grouped and only a single status is run