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

fix (performance): improvements based on code profiler part 2 #3178

Merged
merged 42 commits into from
May 23, 2024

Conversation

mxkae
Copy link
Contributor

@mxkae mxkae commented May 6, 2024

fixes #3172

bfintal@gmail.com added 30 commits April 25, 2024 18:49
Copy link

github-actions bot commented May 6, 2024

🤖 Pull request artifacts

file commit
pr3178-stackable-3178-merge.zip b6972f7

github-actions bot added a commit that referenced this pull request May 6, 2024
github-actions bot added a commit that referenced this pull request May 15, 2024
Copy link
Contributor

@bfintal bfintal left a comment

Choose a reason for hiding this comment

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

Comments:

  • Please also commit the built file src/stk-block-types.php so the plugin would work even by just doing a checkout

src/blocks.php Outdated
Comment on lines 39 to 40
$block_type = new WP_Block_Type( $metadata['name'], $block_args );
register_block_type( $block_type );
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason why we can't just register the block right away?

register_block_type( $metadata['name'], $block_args );

Copy link
Contributor Author

Choose a reason for hiding this comment

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

based on this documentation , register_block_type accepts a string or an instance of WP_Block_Type for the first argument, if it's a string it will consider it as a path to the block.json and will try to use register_block_type_from_metadata() instead.

@mxkae mxkae changed the base branch from develop to fix/performance-code-profiler May 16, 2024 05:41
Base automatically changed from fix/performance-code-profiler to develop May 23, 2024 11:21
@bfintal bfintal merged commit a525255 into develop May 23, 2024
1 of 6 checks passed
@bfintal bfintal deleted the fix/performance-code-profiler-part-2 branch May 23, 2024 11:24
github-actions bot added a commit that referenced this pull request May 23, 2024
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.

Performance Optimizations (part 2)
2 participants