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

refactor: remove obsolete All class #338

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

drupol
Copy link
Collaborator

@drupol drupol commented Feb 20, 2024

Today, thanks to @dantleech (in https://www.dantleech.com/blog/2024/02/18/my-php-problems/), I discovered that iterator_to_array had a second parameter bool $preserve_keys = true...

Therefore, this PR improve the overall performance of this library.

Copy link

what-the-diff bot commented Feb 20, 2024

PR Summary

  • Optimization of all method in Collection.php
    The code for retrieving all elements in our data collection has been simplified. It no longer uses a more complicated 'Operation' process, but instead directly converts the existing collection to an array. This makes our program more efficient.

@drupol drupol force-pushed the perf/remove-All-operation branch from ef07752 to 6c19ba3 Compare February 20, 2024 15:46
@drupol drupol marked this pull request as ready for review February 20, 2024 15:50
@drupol drupol force-pushed the perf/remove-All-operation branch from 6c19ba3 to 9140cb1 Compare February 20, 2024 16:35
@drupol drupol changed the base branch from master to update-annotations-remove-prefix February 20, 2024 16:52
@drupol drupol changed the base branch from update-annotations-remove-prefix to master February 20, 2024 16:53
@drupol drupol merged commit a7e549f into master Feb 20, 2024
15 checks passed
@drupol drupol deleted the perf/remove-All-operation branch February 20, 2024 19:36
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