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

Helper cache #3779

Merged
merged 2 commits into from
Oct 16, 2020
Merged

Helper cache #3779

merged 2 commits into from
Oct 16, 2020

Conversation

MGatner
Copy link
Member

@MGatner MGatner commented Oct 15, 2020

Description
Adds a local static cache of helpers that have already been loaded, so multiple calls to the same file with helper() won't result in duplicate filesystem searches.

Bonus: This sped up tests on CommonFunctionTest.php by 7 seconds (30s -> 20s) so will likely help overall test time!

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • n/a User guide updated
  • Conforms to style guide

Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

Oh... I didn't realize we didn't cache helpers. Nicely done. Tests speed increased noticeably.

Coveralls is getting annoying.

@MGatner MGatner merged commit 3ffdca6 into codeigniter4:develop Oct 16, 2020
@MGatner MGatner deleted the helper-cache branch November 28, 2020 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants