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

Reorder work in EventHandlers#onBeforeRequest to increase speed #358

Merged
merged 3 commits into from Apr 1, 2019

Conversation

@wlycdgr
Copy link
Member

@wlycdgr wlycdgr commented Mar 20, 2019

EventHandlers#onBeforeRequest currently calls isBug before calling PolicySmartBlock.isInsecureRequest and returning immediately if that second call returns true. But this second call does not rely on the results of the expensive call to isBug, which also does not produce any side effects I've been able to notice. So I moved the isBug call below the call to isInsecureRequest.

  • Have you followed the guidelines in CONTRIBUTING.md?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do?
  • Does your submission pass tests?
  • Did you lint your code prior to submission?
…Bug calculations when the request is insecure
@wlycdgr wlycdgr requested review from IAmThePan and jsignanini Mar 20, 2019
@jsignanini jsignanini merged commit 5db7bed into develop Apr 1, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@jsignanini jsignanini deleted the imp/refactor-onBeforeRequest branch Apr 1, 2019
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

3 participants