Re: The plugin slows down the site by littering the wp_options table

未关闭
#672 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
php, wordpress
领域
backend, databases

调研方向

从 woocommerce/utilities/class-sv-wp-background-job-handler.php 的 create_job 和 get_job 入口点开始,然后查看链接的 WordPress 支持报告。将当前在 wp_options 中的存储方式以及基于 LIKE 的查询与提议的 job 字段进行比较。完成的标准是后台 job 使用带有适当键的专用表,而不是将 job 数据存储在 wp_options 中。

由索引模型根据 Issue 内容生成。

描述

@see https://wordpress.org/support/topic/the-plugin-slows-down-the-site-by-littering-the-wp_options-table/

the create_job ( https://github.com/godaddy-wordpress/wc-plugin-framework/blob/1c2fb1a31228f754ef7427f15ac034d3d8cb6de0/woocommerce/utilities/class-sv-wp-background-job-handler.php#L391 )

and
get_job ( https://github.com/godaddy-wordpress/wc-plugin-framework/blob/1c2fb1a31228f754ef7427f15ac034d3d8cb6de0/woocommerce/utilities/class-sv-wp-background-job-handler.php#L391 0

are really bad for performance as they do not have integer primary keys and use LIKE queries in the option_value's.

It needs to be converted to a dedicated table like this (just an example):

ID (PK, integer or varchar)
identifier (key)
status (key)
created_at (datetime)
created_by (int)
started_processing_at (datetime)
updated_at (datetime)
total (int)
progress (int)
handles (text)
completed_at (datetime)
data (text)

主要语言
PHP
星标
146
派生
43
平均合并
1 天 33 分钟
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

godaddy-wordpress/wc-plugin-framework 的其他 Issue

查看 godaddy-wordpress/wc-plugin-framework 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。