Skip to content

Code. Code optimization.#656

Open
alexander-b-clean wants to merge 1 commit into
devfrom
get-modules-optimization.ab
Open

Code. Code optimization.#656
alexander-b-clean wants to merge 1 commit into
devfrom
get-modules-optimization.ab

Conversation

@alexander-b-clean
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Optimizes module discovery for WordPress plugins/themes by reducing filesystem traversal work and reusing results within a request.

Changes:

  • Adds a per-request static cache to spbc_get_modules_by_type() to avoid repeated directory scans.
  • Speeds up module enumeration by iterating only directories (GLOB_ONLYDIR) and using direct style.css lookup for themes.
  • Simplifies plugin key derivation to use the module directory basename and stops scanning after the first valid plugin header is found.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

5 participants