Skip to content

Just use a slice when rendering file #16774

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

Merged
merged 4 commits into from
Aug 23, 2021

Conversation

zeripath
Copy link
Contributor

Highlight currently uses a map which is memory inefficient. Switch to use a slice instead.

Signed-off-by: Andrew Thornton [email protected]

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Aug 22, 2021
@zeripath zeripath added this to the 1.16.0 milestone Aug 22, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2021

Codecov Report

Merging #16774 (9382c99) into main (db1e3d0) will decrease coverage by 0.02%.
The diff coverage is 55.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16774      +/-   ##
==========================================
- Coverage   45.52%   45.50%   -0.03%     
==========================================
  Files         762      762              
  Lines       85939    85937       -2     
==========================================
- Hits        39124    39105      -19     
- Misses      40508    40520      +12     
- Partials     6307     6312       +5     
Impacted Files Coverage Δ
modules/highlight/highlight.go 60.39% <55.55%> (+0.20%) ⬆️
modules/util/timer.go 42.85% <0.00%> (-42.86%) ⬇️
modules/queue/workerpool.go 53.81% <0.00%> (-3.44%) ⬇️
modules/queue/manager.go 65.34% <0.00%> (-2.85%) ⬇️
routers/api/v1/repo/pull.go 29.11% <0.00%> (-0.52%) ⬇️
services/pull/pull.go 41.78% <0.00%> (ø)
modules/log/file.go 75.20% <0.00%> (+1.60%) ⬆️

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 94f529a...9382c99. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 22, 2021
Copy link
Member

@lunny lunny left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

@GiteaBot GiteaBot 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 Aug 23, 2021
@GiteaBot GiteaBot 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 Aug 23, 2021
@zeripath
Copy link
Contributor Author

Make lgtm work

@zeripath zeripath merged commit f31e7a6 into go-gitea:main Aug 23, 2021
@zeripath zeripath deleted the just-use-slice-in-fileformat branch August 23, 2021 21:23
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
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.

5 participants