-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add Author as a field in Repository #682
Conversation
Motivation: `Repository.author()` and `Repository.creationTimeMillis()` have a blocking call in it. We can add `author` and `creationTimeMillis` as member variables and assign them in the consturctor to avoid the blocking call. Modifications: - Add `author` and `creationTimeMillis` as member variables - Change `Repository.author()` and `Repository.creationTimeMillis()` methods not to have implementation Result: - `Repository.author()` and `Repository.creationTimeMillis()` do not block anymore.
Codecov Report
@@ Coverage Diff @@
## master #682 +/- ##
============================================
+ Coverage 70.04% 70.15% +0.10%
+ Complexity 3415 3414 -1
============================================
Files 349 349
Lines 13482 13468 -14
Branches 1454 1454
============================================
+ Hits 9444 9448 +4
+ Misses 3153 3136 -17
+ Partials 885 884 -1
Continue to review full report at Codecov.
|
@@ -315,6 +318,9 @@ | |||
commitIdDatabase.rebuild(jGitRepository); | |||
assert headRevision.equals(commitIdDatabase.headRevision()); | |||
} | |||
final Commit initialCommit = blockingHistory(Revision.INIT, Revision.INIT, ALL_PATH, 1).get(0); |
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.
Could we also update CachingRepository
to delegate author
and creationTimeMillis
?
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.
Thanks, fixed. 😉
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.
Thanks, @minwoox!
Thanks, @ikhoon! |
Motivation:
Repository.author()
andRepository.creationTimeMillis()
have a blocking call in it.We can add
author
andcreationTimeMillis
as member variables and assign them in the constructor to avoid the blocking call.Modifications:
author
andcreationTimeMillis
as member variablesRepository.author()
andRepository.creationTimeMillis()
methods not to have implementationResult:
Repository.author()
andRepository.creationTimeMillis()
do not block anymore.