Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance when resolving the workspace root #6820

Open
wants to merge 1 commit into
base: google
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

Improve performance when resolving the workspace root

Description from original PR (#6530):

The original logic when resolving the dependency label, it loops through the entire {baze-base}/external dir, and check if the file is dir, then create a map for with the workspaceName as key and its dir path as value. Which when the external is really big the IO operation could hang there for a long time cause the IDE freeze.

This change use the {baze-base}/external/{workspaceName} to construct the workspace root dir. And if it existed then construct the WorkspaceRoot and return.

Description from original PR (#6530):

The original logic when resolving the dependency label, it loops through the entire {baze-base}/external dir, and check if the file is dir, then create a map for with the workspaceName as key and its dir path as value. Which when the external is really big the IO operation could hang there for a long time cause the IDE freeze.

This change use the {baze-base}/external/{workspaceName} to construct the workspace root dir. And if it existed then construct the WorkspaceRoot and return.

PiperOrigin-RevId: 679264404
@copybara-service copybara-service bot added the copybara-exported Added to PRs opened by copybara-service label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
copybara-exported Added to PRs opened by copybara-service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant