Hi Ioana,

I looked into the code and with the current implementation and your changes all 
of commands are execute via a BBSession->ShellSession's execute which has 
always been a synchronized function.  The only difference is the current 
implementation, for each command it is using the local process and its output, 
as to your changes is via a remoteconnection helper.  So the delay is caused by 
the output returned via the remote connection helper?  If so, probably we need 
to look into why such a big different.  Since I've been testing against local 
connection not even against a real remote connection yet.  Or am I missing 
something here?

With the patch, we just shift the symptom since the project is still not fully 
utilized even though it shows up quickly.

Thanks,
Jessica

-----Original Message-----
From: Grigoropol, IoanaX
Sent: Wednesday, December 12, 2012 4:04 AM
To: Zhang, Jessica; yocto@yoctoproject.org
Subject: RE: [yocto] [PATCH v3] 
[eclipse-poky-windows][branch:windows-build]Remove validate existing repository 
radio button

Hi Jessica,

I have sent a new patch that targets the downtime issue that you reported, 
against windows-build current branch.
The downtime that you noticed it is due to the fact that with the current 
implementation, the commands are ran synchronously, meaning that each command 
must wait for the previous one to finish.
In the past, this was done by creating a process for each command, and waiting 
for its output. At the moment, we have a shell per remote connection, and we 
need to know when a command has finished running.
In the case of the New Bitbake project, the downtime is caused by sourcing the 
environment, and retrieving the values outputted by "bitbake -e".
With the current patch, the output of this command, is silenced and the process 
is not blocking the new project wizard, but running in the background.
There is one scenario in which this implementation is not "safe", which is that 
where the user creates a new project from an existing directory, and soon after 
does some operation that uses the presumably already populated environment from 
bitbake, which may or may not be available, since it is sent in the background. 
One possible solution for this, is to show to the user that this operation is 
in progress, and he still needs to wait a bit for this to be done before 
performing any operations that might need this information.
What is your opinion on this matter?

Thanks,
Ioana

-----Original Message-----
From: Zhang, Jessica
Sent: Wednesday, December 12, 2012 12:44 AM
To: Grigoropol, IoanaX; yocto@yoctoproject.org
Subject: RE: [yocto] [PATCH v3] 
[eclipse-poky-windows][branch:windows-build]Remove validate existing repository 
radio button

Hi Ioana,

I merged your patches up to this one to jzhang/windows-build branch of 
eclipse-poky.  Please send out the final patches for Linux performance 
improvements that we've discussed.  Also, many java files there's a comment 
section at the beginning, can you add some comments about your changes to those 
files? For example, 
plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java

Thanks,
Jessica

-----Original Message-----
From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On 
Behalf Of Ioana Grigoropol
Sent: Tuesday, December 11, 2012 6:04 AM
To: yocto@yoctoproject.org
Subject: [yocto] [PATCH v3] [eclipse-poky-windows][branch:windows-build]Remove 
validate existing repository radio button

- remove radio button for validating existing repository but keep performing 
the validation in the back
- make 'clone' button a check button

Signed-off-by: Ioana Grigoropol <ioanax.grigoro...@intel.com>
---
 .../yocto/bc/ui/wizards/install/OptionsPage.java   |   30 ++++----------------
 1 file changed, 6 insertions(+), 24 deletions(-)

diff --git 
a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java 
b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
index 9e94aea..72aeec2 100644
--- 
a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/Option
+++ sPage.java
@@ -54,7 +54,6 @@ public class OptionsPage extends FiniteStateWizardPage {
        private ValidationListener validationListener;
        private Text txtProjectName;
        private Button btnGit;
-       private Button btnValidate;

        private RemoteProjectContentsLocationArea locationArea;

@@ -67,7 +66,7 @@ public class OptionsPage extends FiniteStateWizardPage {
        public void createControl(Composite parent) {
                top = new Composite(parent, SWT.None);
                top.setLayout(new GridLayout());
-               top.setLayoutData(new GridData(GridData.FILL_BOTH));
+               top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

                GridData gdFillH = new GridData(GridData.FILL_HORIZONTAL);

@@ -97,25 +96,13 @@ public class OptionsPage extends FiniteStateWizardPage {

                locationArea = new 
RemoteProjectContentsLocationArea(errorReporter, top, null);

-               Group locationValidationGroup = new Group(top, SWT.NONE);
-               locationValidationGroup.setText("Git repository");
-               GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | 
GridData.FILL_HORIZONTAL);
-               locationValidationGroup.setLayoutData(gd);
-               GridLayout gl = new GridLayout(1, false);
-               locationValidationGroup.setLayout(gl);
-
-               btnGit = new Button(locationValidationGroup, SWT.RADIO);
+               btnGit = new Button(top, SWT.CHECK);
                btnGit.setText("Clone from Yocto Project &Git Repository into 
new location");
                btnGit.setEnabled(true);
                btnGit.setSelection(true);
                btnGit.addSelectionListener(validationListener);
-
-
-               btnValidate = new Button(locationValidationGroup, SWT.RADIO);
-               btnValidate.setText("&Validate existing Git project location");
-               btnValidate.setEnabled(true);
-               btnValidate.setSelection(false);
-               btnValidate.addSelectionListener(validationListener);
+               GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | 
GridData.FILL_HORIZONTAL);
+               btnGit.setLayoutData(gd);

                setControl(top);
        }
@@ -165,16 +152,11 @@ public class OptionsPage extends FiniteStateWizardPage {
                String projectPath = projectLoc + separator + getProjectName();
                IHostFile repoDest = RemoteHelper.getRemoteHostFile(connection, 
projectPath, new NullProgressMonitor());

-               if(btnValidate.getSelection()) {
+               if(!btnGit.getSelection()) {
                        if (repoDest == null || !repoDest.exists()) {
                                setErrorMessage("Directory " + projectPath + " 
does not exist, please select git clone.");
                                return false;
                        }
-//                     IHostFile gitDescr = 
RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new 
NullProgressMonitor());
-//                     if (gitDescr == null || !gitDescr.exists()) {
-//                             setErrorMessage("Directory " + projectPath + " 
does not contain a git repository, please select git clone.");
-//                             return false;
-//                     }

                        IHostFile validationFile = 
RemoteHelper.getRemoteHostFile(connection, projectPath + URI_SEPARATOR + 
InstallWizard.VALIDATION_FILE, new NullProgressMonitor());
                        if (validationFile == null || !validationFile.exists()) 
{ @@ -185,7 +167,7 @@ public class OptionsPage extends FiniteStateWizardPage {
                        if (repoDest.exists() && repoDest.isDirectory()) {
                                IHostFile gitDescr = 
RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new 
NullProgressMonitor());
                                if (gitDescr != null && gitDescr.exists()) {
-                                       setErrorMessage("Directory " + 
projectPath + " contains a repository, please select validate repository.");
+                                       setErrorMessage("Directory " + 
projectPath + " contains a
+repository, please choose another location or skip cloning the
+repository.");
                                        return false;
                                }
                        }
--
1.7.9.5

_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to