-
Notifications
You must be signed in to change notification settings - Fork 96
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
Chore/simplify project by removing redundancy #1639
base: main
Are you sure you want to change the base?
Conversation
Unit Test Results1 900 tests +2 1 899 ✅ +2 54s ⏱️ ±0s Results for commit 8dd6d57. ± Comparison against base commit e700e3e. This pull request removes 3 and adds 5 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
E2E Test Results 4 files - 1 268 suites - 133 30m 7s ⏱️ - 37m 21s Results for commit f0819f2. ± Comparison against base commit 8f7c2d9. This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is a hard reject from me. Apart from the no-go refactoring of HasDependencyOn
, the rest of the changes are, in my opinion, not better, but make it more complicated and less performent.
I do agree, that there are some things we can do better, but we need to talk about them and plan them properly. There are some reasons why we do have some redundency.
pkg/project/v2/project.go
Outdated
for _, dep := range dependencies { | ||
if dep == project.Id { | ||
return true | ||
for c := range slices.Values(p.ConfigList()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method just went from a O(n)
to an O(n^4)
(O(n^2)
from ConfigList) + O(n^2)
from this method).
Furthermore, in ConfigList we do collect the configs now on every call, just to find the dependencies. This is an intended redundency so that other parts of Monaco work in a timely manner. We took much time to optimize this method (and the whole topology sort) to what it is today to optimize it.
This refactoring here is not acceptable, and must not be done.
f0819f2
to
072174d
Compare
072174d
to
8dd6d57
Compare
|
What this PR does / Why we need it:
Special notes for your reviewer:
Does this PR introduce a user-facing change?