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

Optimize nikola check #2027

Merged
merged 2 commits into from Sep 6, 2015
Merged

Optimize nikola check #2027

merged 2 commits into from Sep 6, 2015

Conversation

@felixfontein
Copy link
Contributor

@felixfontein felixfontein commented Sep 5, 2015

When nikola check is run with more than one flag, it runs _call_nikola_list several times to retrieve the same data. Adds a (optional) cache to avoid unnecessary calls.

This also fixes failure return in _execute().

def _call_nikola_list(site):
def _call_nikola_list(site, cache=None):
if cache is not None:
if 'files' in cache and 'deps' in cache:

This comment has been minimized.

@Kwpolska

Kwpolska Sep 6, 2015
Member

Is this check necessary?

This comment has been minimized.

@felixfontein

felixfontein Sep 6, 2015
Author Contributor

Yes, because this checks if the values are in the cache. (Just checking one of the two is fine as well.)

This comment has been minimized.

@Kwpolska

Kwpolska Sep 6, 2015
Member

I would just trust that a correct cache is given, but okay.

This comment has been minimized.

@felixfontein

felixfontein Sep 6, 2015
Author Contributor

Somehow the cache must be filled when the values are not in there yet.

This comment has been minimized.

@Kwpolska

Kwpolska Sep 6, 2015
Member

I misunderstood the implementation slightly.

Kwpolska added a commit that referenced this pull request Sep 6, 2015
Optimize nikola check
@Kwpolska Kwpolska merged commit 27dca29 into master Sep 6, 2015
3 checks passed
3 checks passed
continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@Kwpolska Kwpolska deleted the optimize-nikola-check branch Sep 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants