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

Minimize array allocations in the `where` filter #6860

Merged
merged 1 commit into from Mar 21, 2018

Conversation

Projects
None yet
4 participants
@ashmaroli
Member

ashmaroli commented Mar 19, 2018

Since Kernel#Array creates an array out of the returned item_property, calling map! here only modifies elements of the said array which is already being done currently (albeit by creating more copies of the array..)

This reduces a lot a Array allocations especially when a large Collection is piped to the where filter multiple times in Liquid..

@ashmaroli ashmaroli added the internal label Mar 19, 2018

@ashmaroli ashmaroli added this to the v3.8.0 milestone Mar 19, 2018

@oe

oe approved these changes Mar 21, 2018

Nice one!

@Crunch09

👍

@oe

This comment has been minimized.

Member

oe commented Mar 21, 2018

@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 33f59ae into jekyll:master Mar 21, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ashmaroli ashmaroli deleted the ashmaroli:reduce-where-arrays branch Mar 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment