Skip to content

Conversation

@guw
Copy link
Member

@guw guw commented Oct 29, 2025

As per #8 we seem to spend quite a bit of time in the Eclipse resource tree. Thus, we need to cache IProject references early.

Closes #8.
Replaces #9.

As per #8 we seem to
spend quite a bit of time in the Eclipse resource tree. Thus, we need to
cache IProject references early.
@github-actions
Copy link

github-actions bot commented Oct 29, 2025

Test Results

 40 files  ±0   40 suites  ±0   22s ⏱️ +3s
 57 tests ±0   56 ✅ ±0   1 💤 ±0  0 ❌ ±0 
114 runs  ±0  103 ✅ ±0  11 💤 ±0  0 ❌ ±0 

Results for commit fd0c872. ± Comparison against base commit 9f8988a.

♻️ This comment has been updated with latest results.

@guw
Copy link
Member Author

guw commented Nov 3, 2025

@snjeza I modified the PR slightly to eagerly check for project

@snjeza
Copy link

snjeza commented Nov 3, 2025

I have tried to import small. Bazel Eclipse throws

org.eclipse.core.runtime.CoreException: Error provisioning project for package 'BazelPackage (//module1) [OPEN]'
	at com.salesforce.bazel.eclipse.ui.wizards.BazelImportWizard.lambda$2(BazelImportWizard.java:86)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2505)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2528)
	at com.salesforce.bazel.eclipse.ui.wizards.BazelImportWizard.lambda$1(BazelImportWizard.java:80)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:123)
Caused by: org.eclipse.core.runtime.CoreException: Unable to find project for Bazel package '//module1' in the Eclipse workspace. Please check the workspace setup!
	at com.salesforce.bazel.eclipse.core.model.BazelPackageInfo.getBazelProject(BazelPackageInfo.java:171)
	at com.salesforce.bazel.eclipse.core.model.BazelPackage.getBazelProject(BazelPackage.java:154)
	at com.salesforce.bazel.eclipse.core.model.discovery.ProjectPerPackageProvisioningStrategy.provisionPackageProject(ProjectPerPackageProvisioningStrategy.java:458)
	at com.salesforce.bazel.eclipse.core.model.discovery.ProjectPerPackageProvisioningStrategy.doProvisionProjects(ProjectPerPackageProvisioningStrategy.java:351)
	at com.salesforce.bazel.eclipse.core.model.discovery.BaseProvisioningStrategy.doProvisionProjects(BaseProvisioningStrategy.java:1224)
	at com.salesforce.bazel.eclipse.core.model.discovery.BaseProvisioningStrategy.provisionProjectsForSelectedTargets(BaseProvisioningStrategy.java:1810)
	at com.salesforce.bazel.eclipse.core.model.SynchronizeProjectViewJob.provisionProjectsForTarget(SynchronizeProjectViewJob.java:546)
	at com.salesforce.bazel.eclipse.core.model.SynchronizeProjectViewJob.runInWorkspace(SynchronizeProjectViewJob.java:718)
	at com.salesforce.bazel.eclipse.core.setup.ImportBazelWorkspaceJob.runInWorkspace(ImportBazelWorkspaceJob.java:146)
	at com.salesforce.bazel.eclipse.ui.wizards.BazelImportWizard.lambda$2(BazelImportWizard.java:81)

@guw
Copy link
Member Author

guw commented Nov 3, 2025

I think it's not easily possible to avoid doing the project discovery twice during import/creation. I don't want to open the API to allow injecting project from outside (eg., import wizard). Ideally it would rely on resource events entirely.

@snjeza
Copy link

snjeza commented Nov 3, 2025

@guw you may want to take a look at #16

@snjeza
Copy link

snjeza commented Nov 3, 2025

I think it's possible to avoid doing the project discovery twice during import/creation. I don't want to open the API to allow injecting project from outside (eg., import wizard). Ideally it would rely on resource events entirely.

@guw it works fine for me.

@guw guw merged commit dd7acf3 into main Nov 3, 2025
4 checks passed
@guw guw deleted the performance branch November 3, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Synchronization of bazel projects (performance)

3 participants