Merged
Conversation
igor-raits
reviewed
May 24, 2019
igor-raits
reviewed
May 24, 2019
| Repo *r; | ||
| FOR_REPOS(id, r) | ||
| if (r->appdata) | ||
| g_free (r->appdata); |
Collaborator
Author
There was a problem hiding this comment.
Because I save the repomd checksum in repo->appdata (repo.c:751)
Collaborator
Author
There was a problem hiding this comment.
I added a comment to explain why it's needed.
Collaborator
Author
|
@ignatenkobrain any further comments on this PR? |
This way we can focus the solver related functions to fus.c Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
igor-raits
reviewed
Jul 9, 2019
| } | ||
|
|
||
| static gchar * | ||
| chksum_string_for_filepath (GChecksumType type, const char *filepath) |
Member
There was a problem hiding this comment.
Can't you just use solv function to transform Chksum into string?
Collaborator
Author
There was a problem hiding this comment.
GLib returns a nice hexadecimal string already. Libsolv returns binary data that I'd have to convert to a readable string.
igor-raits
reviewed
Jul 9, 2019
igor-raits
reviewed
Jul 9, 2019
igor-raits
reviewed
Jul 9, 2019
Avoid doing unnecessary allocations and use memcmp directly to compare the checksums Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
This can be specially helpful when doing multiple queries on the same repo metadata. Solves fedora-modularity#65 Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
Collaborator
Author
|
@lubomir have you tried this PR out? |
Member
|
sure, go ahead |
Collaborator
Author
|
Cool, I'll rebase #72 on this one which will be easier than the other way around. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Command:
Before: downloading metadata
11.88user 1.02system 0:42.10elapsed 30%CPU (0avgtext+0avgdata 374312maxresident)k 40inputs+128680outputs (1major+142867minor)pagefaults 0swapsBefore: cached metadata
11.28user 0.23system 0:12.17elapsed 94%CPU (0avgtext+0avgdata 391584maxresident)k 0inputs+32outputs (0major+156295minor)pagefaults 0swapsAfter: downloading metadata & saving repo cache
14.81user 1.22system 0:48.40elapsed 33%CPU (0avgtext+0avgdata 368884maxresident)k 0inputs+272288outputs (0major+156736minor)pagefaults 0swapsAfter: cached metadata & cached repo
1.07user 0.07system 0:02.05elapsed 56%CPU (0avgtext+0avgdata 94164maxresident)k 0inputs+32outputs (0major+26174minor)pagefaults 0swaps