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

feat: auto load Give options in Give_Cache to prevent frequent multiple queries #3872

Closed
ravinderk opened this issue Nov 26, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@ravinderk
Copy link
Collaborator

commented Nov 26, 2018

Feature Request

Description

As we can see in the screenshot, we are doing a few DB queries to fetch plugin option. We can prevent multiple queries by preloading them to Give_Cache

image

List of frequently load options:

  • give_settings
  • give_version
  • give_completed_upgrades
  • __give_get_active_license_info
  • give_is_addon_activated
  • give_doing_upgrade
  • give_install_pages_created
  • give_show_db_upgrade_complete_notice
  • give_cache__give_activation_redirect
  • give_cache__give_installed
  • _give_table_check: Need to discuss maybe we can remove code.
  • give_cache__give_ajax_works
  • give_paused_batches ?
  • give_cache__give_notice_give_upgrade_db ?
  • give_cache_hide_license_notice_after_activation
  • give_cache__give_notice_give-invalid-license_shortly_**

We can save <12 queries If we load them prior to use and maintain result in cache.

Acceptance Criteria

  • Identify plugin option which we are fetching on each page load.
  • Preload option to Give_Cache which we query on each page load.
  • get, set and delete option must update cached value.
  • Add PHPUnit tests
@ravinderk

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 17, 2018

Slack Chat Summary

Participants: @DevinWalker @ravinderk
Topic: Can we start working on this
Result: As we discuss, we can start working on this if a few points will be taken care ( added in to acceptance criteria).
ref: https://givewp.slack.com/archives/C0FAGC83C/p1544788335124300

@ravinderk ravinderk assigned ravinderk and unassigned DevinWalker Dec 17, 2018

DevinWalker added a commit that referenced this issue Dec 28, 2018

Merge pull request #3896 from impress-org/issue/3871
feat: reorganize plugin files and  auto load common options to improve plugin performance #3871 #3872
@kevinwhoffman

This comment has been minimized.

Copy link
Member

commented Jan 10, 2019

@ravinderk Can you provide an update on this and whether you think it should stay in 2.4.0 with projected release of next week?

@ravinderk

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 11, 2019

@kevinwhoffman this implemented for the frontend, so one part of this issue done. Next phase of this issue will be implement this in admin which we can do after 2.4.0

@kevinwhoffman

This comment has been minimized.

Copy link
Member

commented Jan 14, 2019

Per @ravinderk's recommendation, I'm removing this from 2.4.0 and moving back to Product Backlog to address the rest of the options mentioned in Acceptance Criteria in a future release.

DevinWalker added a commit that referenced this issue Mar 4, 2019

Merge pull request #4023 from impress-org/issue/3872
feat: auto load Give options in Give_Cache to prevent frequent multiple queries #3872
@kevinwhoffman

This comment has been minimized.

Copy link
Member

commented Mar 5, 2019

Closing as this was resolved in #4023 but did not auto-close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.