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

feat: use SDR for conflict detect perf improvements #3246

Merged
merged 6 commits into from
May 21, 2021

Conversation

rcoringrato-sfdc
Copy link
Contributor

What does this PR do?

  • Use SDR library to improve performance of conflict detection.
  • Add manifest support for caching project metadata

What issues does this PR fix or reference?

@W-9164033@

@rcoringrato-sfdc rcoringrato-sfdc requested a review from a team as a code owner May 18, 2021 18:50
this.sourceComponents = this.isManifest
? await ComponentSet.fromManifest({
manifestPath: this.componentPath,
resolveSourcePaths: [this.projectPath]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to make this a list of the project's package directories. If projectPath is the root of the project, it'll still work but will end up over-scanning irrelevant files like node_modules which could impact the performance

getRootWorkspacePath(),
this.isManifest
);
return await this.cacheService.getSourceComponents();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, remove await since we're already returning a promise

if (throwErrorOnFailure) {
throw error;
}
private async handleCacheResults(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this handleCacheResults used and how is this different from the one in forceSourceDiff.ts ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, so this is specifically used for the conflict detection part here. I think we need a separate diffService.ts and move some of the diff specific code there. Can be part of a separate devchoice/refactoring story.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. There is some overlap, but they will diverge as conflict detection progresses.

@rcoringrato-sfdc rcoringrato-sfdc merged commit eb3d173 into develop May 21, 2021
@rcoringrato-sfdc rcoringrato-sfdc deleted the rc/conflict-service branch May 21, 2021 19:59
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.

None yet

4 participants