Skip to content

Fix: Don't create pQuery instance unless $attributes['source'] isset.#82

Open
tkjaergaard wants to merge 1 commit intospacedmonkey:masterfrom
tkjaergaard:fix-unecessary-dom-parsing
Open

Fix: Don't create pQuery instance unless $attributes['source'] isset.#82
tkjaergaard wants to merge 1 commit intospacedmonkey:masterfrom
tkjaergaard:fix-unecessary-dom-parsing

Conversation

@tkjaergaard
Copy link

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.

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.

1 participant