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

Remove unnecessary IssueList attribute loads #2936

Merged
merged 2 commits into from
Nov 21, 2017

Conversation

ethantkoenig
Copy link
Member

IssueList.loadAttributes() loads attachments and comments, but these fields are rarely used for lists of issues. This PR updates IssueList.loadAttributes() to load everything except attachments and comments, and add separate methods for explicitly loading attachments/comments.

@codecov-io
Copy link

codecov-io commented Nov 19, 2017

Codecov Report

Merging #2936 into master will decrease coverage by 0.19%.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #2936     +/-   ##
========================================
- Coverage      27%   26.8%   -0.2%     
========================================
  Files          90      90             
  Lines       17806   17807      +1     
========================================
- Hits         4809    4774     -35     
- Misses      12310   12353     +43     
+ Partials      687     680      -7
Impacted Files Coverage Δ
models/issue_list.go 50.6% <0%> (-12.45%) ⬇️
models/issue_indexer.go 7.79% <0%> (-0.32%) ⬇️
modules/process/manager.go 69.56% <0%> (-4.35%) ⬇️

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 10b54df...1721cfa. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 19, 2017
@lunny
Copy link
Member

lunny commented Nov 20, 2017

@ethantkoenig if any place which reference LoadAttributes really needs comments or attachments?

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Nov 20, 2017
@lunny lunny added this to the 1.x.x milestone Nov 20, 2017
@ethantkoenig
Copy link
Member Author

@lunny Only in models/issue_indexer.go (which needs comments), and I've added a call to LoadComments(..) there

@lunny lunny modified the milestones: 1.x.x, 1.4.0 Nov 21, 2017
@lunny
Copy link
Member

lunny commented Nov 21, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 21, 2017
@lafriks
Copy link
Member

lafriks commented Nov 21, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 21, 2017
@lunny lunny merged commit 0f6dc41 into go-gitea:master Nov 21, 2017
@ethantkoenig ethantkoenig deleted the perf/issues branch November 25, 2017 05:10
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants