-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix part of #6024: Consolidate file-access #6023
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #6023 +/- ##
========================================
Coverage 45.27% 45.27%
========================================
Files 521 521
Lines 30688 30688
Branches 4597 4597
========================================
Hits 13894 13894
Misses 16794 16794 Continue to review full report at Codecov.
|
Hi @brianrodri, thanks for the PR. Just one clarification. It does look like this PR should reduce the time taken by the linting checks. But on checking the travis log, before the PR and the PR build seems to be taking the same time (about 27 mins). Is this as expected? I thought the PR build should be significantly faster. |
Hmm, seems like it saves a couple of minutes but I guess it isn't the bottleneck of the work being done. We'll have to do some profiling to find what's going on. |
Sounds good. Yeah, I think something else is the bottleneck. Also is this ready for review? If so, @apb7 do you want to take the first pass here? |
Yes, this is ready for review! |
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.
Hi @brianrodri, just one comment. This is looking pretty good, thanks :)
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.
LGTM, thanks @brianrodri!
Hi @apb7, can this be merged without code owner review? |
Fixes part of #6024: Consolidate file-access
Currently,
pre_commit_linter
opens all of the files in Oppia's codebase several times to do its work.To avoid these costly I/O accesses, this PR introduces a
FileCache
class which functions now (and should continue to) rely on to efficiently access the file contents.