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

refactor: avoid loading project in frequently executed controller methods #7853

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

alexmt
Copy link
Collaborator

@alexmt alexmt commented Dec 3, 2021

PR fixes performance degradation introduced in v2.2 changes:

  • Stops loading project in handleObjectUpdated method. Project is loaded to avoid reconciling app if not-permitted orphaned resource changed. It is cheaper to just reconcile app instead of loading project on every resource change
  • Stops loading "global" project settings just to get orphaned resources settings in application indexer since orphaned resources are not inherited from global project.

Signed-off-by: Alexander Matyushentsev AMatyushentsev@gmail.com

@alexmt alexmt requested a review from jessesuen December 3, 2021 18:18
…hods

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@codecov
Copy link

codecov bot commented Dec 3, 2021

Codecov Report

Merging #7853 (7494a7b) into master (891d9b2) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7853      +/-   ##
==========================================
- Coverage   41.48%   41.48%   -0.01%     
==========================================
  Files         169      169              
  Lines       22256    22254       -2     
==========================================
- Hits         9234     9232       -2     
  Misses      11703    11703              
  Partials     1319     1319              
Impacted Files Coverage Δ
controller/appcontroller.go 52.93% <100.00%> (-0.10%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 891d9b2...7494a7b. Read the comment docs.

Copy link
Member

@rbreeze rbreeze left a comment

Choose a reason for hiding this comment

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

LGTM

@alexmt alexmt merged commit 05935a9 into argoproj:master Dec 3, 2021
@alexmt alexmt deleted the avoid-load-project branch December 3, 2021 21:18
alexmt pushed a commit that referenced this pull request Dec 3, 2021
…hods (#7853)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
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.

2 participants