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

Allocate fewer objects when searching #1144

Merged
merged 1 commit into from
Jul 1, 2017

Conversation

starwed
Copy link
Member

@starwed starwed commented Jun 24, 2017

A few changes to Crafty.map.search

  • Maximum of one array created per search
  • Possibility to provide 'output' array
  • Split filtererd/unfiltered search into two separate methods

Because of the last two points, I still need to update some of the docs/comments, but figured I'd check whether we wanted to change the api like this first.

(I also have a follow-up PR that simplifies a couple of the core 'Collision' methods in a similar way.)

- Maximum of one array created per search
- Possibility to provide 'output' array
- Split filtererd/unfiltered search into two separate methods
@starwed
Copy link
Member Author

starwed commented Jul 1, 2017

Merging. There is probably some follow-up work to make more internal uses of search pass in a results object.

@starwed starwed merged commit 0915966 into craftyjs:develop Jul 1, 2017
@starwed starwed deleted the better-search branch July 1, 2017 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant