wp-rest-blocks
wp-rest-blocks copied to clipboard
Fix: Don't create pQuery instance unless $attributes['source'] isset.
Right now on each get_attribute call a new instance of pQuery is created, but we don't use it unless the $attributes['source'] isset.
Moving the instance creation into the if statement should give performance improvements.
Locally is saw a ~50% speed improvement on simple blocks.