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 34630 - PVCS: Operations are slow and load CPU.
Summary: PVCS: Operations are slow and load CPU.
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcsgeneric (show other bugs)
Version: -S1S-
Hardware: PC Solaris
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 34632
  Show dependency tree
 
Reported: 2003-06-26 15:38 UTC by Jiri Kovalsky
Modified: 2004-08-13 12:12 UTC (History)
1 user (show)

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 Jiri Kovalsky 2003-06-26 15:38:13 UTC
Sun ONE Studio 5.0 on Solaris 5.8

Description:
============
Common PVCS operations (like Refresh, Add, Create
Project and etc.) are much slower and have much
higher CPU utilization than similar operations
running from vendor GUI tool. This is serious
performance degradation if compared to Forte for
Java 4.0.
Comment 1 Martin Entlicher 2003-06-26 16:00:41 UTC
It's true. This is since the profile was rewritten to use PCLI
commands, which are written in Java. Therefore a second JVM is being
started in which the commands are executed. This is very inefficient.

The only solution is to execute the PCLI commands through internal
execution in NetBeans. However this might not be trivial, since the
commands may require some system-dependent setup before Java classes
are launched.
Comment 2 Martin Entlicher 2003-10-21 16:28:28 UTC
I thought about "pcli run" command to use for this purpose.
It would be ideal if we can execute "pcli run" once and then tell it
individual commands to process. However this does not seem to be
possible, it accepts only a script file. It does not read commands
from standard input.
Even when I passed /dev/fd/0 as a standard input, it didn't execute
the commands untill EOF was reached.

Thus the only option is to use either Developer's toolkit (which is
native and would have to be compiled for every architecture) or hack
the launch of pcli. In version 7.5 we could probably use vm.jar, but
the setup is not trivial.
Comment 3 Martin Entlicher 2004-04-27 10:22:52 UTC
As this is likely to be quite hard to solve, I've created issue #42500
for optimizations, which can be done into the next release.
Comment 4 Martin Entlicher 2004-05-03 17:59:27 UTC
It looks like this problem can be fixed.
One can create a script, that would process individual commands in a loop:
while 1=1
{
 readline -vCMD
 run -ns $CMD
}

This loop can be started once and commands passed to it through an
input stream. Then there would be just one JVM running pcli script and
executing commands.
Comment 5 Martin Entlicher 2004-05-04 10:19:42 UTC
This is going to be implemented into promotion D.
A special PCLI script with an executor created:

RCS file:
/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PCLICommand.java,v
done
Checking in PCLICommand.java;
/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PCLICommand.java,v
 <--  PCLICommand.java
initial revision: 1.1
done
RCS file:
/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PCLICommandExecutor.java,v
done
Checking in PCLICommandExecutor.java;
/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PCLICommandExecutor.java,v
 <--  PCLICommandExecutor.java
initial revision: 1.1
done
Comment 6 Martin Entlicher 2004-05-04 15:28:37 UTC
The dataRegex and errorRegex are set to the default used in
ExecuteCommand so that the behavior is compatible with OS native commands:

/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PCLICommand.java,v
 <--  PCLICommand.java
new revision: 1.2; previous revision: 1.1
Comment 7 Martin Entlicher 2004-05-04 17:34:37 UTC
ABSPATH and QABSPATHS variables defined. They contain absolute paths
of selected files. This is necessary for the new upcomming form of
PCLI commands, where current working directory is not set:

/cvs/vcscore/src/org/netbeans/modules/vcscore/cmdline/UserCommandSupport.java,v
 <--  UserCommandSupport.java
new revision: 1.35; previous revision: 1.34
Comment 8 Martin Entlicher 2004-05-04 18:22:30 UTC
The commands implementing TextInput interface are used to pass the
textual input:

/cvs/vcscore/src/org/netbeans/modules/vcscore/cmdline/exec/ExternalCommand.java,v
 <--  ExternalCommand.java
new revision: 1.32; previous revision: 1.31

/cvs/vcscore/src/org/netbeans/modules/vcscore/cmdline/ExecuteCommand.java,v
 <--  ExecuteCommand.java
new revision: 1.77; previous revision: 1.76

PCLICommand implements the TextInput interface to handle the input.
PCLICommandExecutor pass the input to the underlying script command:

/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PCLICommand.java,v
 <--  PCLICommand.java
new revision: 1.3; previous revision: 1.2

/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PCLICommandExecutor.java,v
 <--  PCLICommandExecutor.java
new revision: 1.2; previous revision: 1.1
Comment 9 Martin Entlicher 2004-05-05 10:02:08 UTC
Echo command created so that it's not necessary to call echo command
from the OS:

RCS file:
/cvs/vcsgeneric/src/org/netbeans/modules/vcs/profiles/commands/Echo.java,v
/cvs/vcsgeneric/src/org/netbeans/modules/vcs/profiles/commands/Echo.java,v
 <--  Echo.java
initial revision: 1.1
Comment 10 Martin Entlicher 2004-05-05 11:03:15 UTC
Fixed in trunk. The PVCS profile is reworked to use PCLICommand for
execution of PCLI commands. This brings much better responsiveness of
commands, the performance improvement seems to be really huge:

/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/pvcs.xml,v
 <--  pvcs.xml
new revision: 1.15; previous revision: 1.14
done
Checking in pvcsLoc_XX.xml;
/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/pvcsLoc_XX.xml,v
 <--  pvcsLoc_XX.xml
new revision: 1.14; previous revision: 1.13
Comment 11 Antonin Nebuzelsky 2004-06-11 17:19:39 UTC
Folks from VCS QA, could you verify? I don't have PVCS installed and
setup to verify that the PVCS operations are now fast enough. Thanks!
Comment 12 Jiri Kovalsky 2004-07-21 14:57:57 UTC
Our performance measurements confirmed that it got really improved.
Verified in development build #200407151800 of NetBeans 4.0.