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

Optimize ElasticIndexingService #15227

Merged
merged 7 commits into from
Feb 9, 2024
Merged

Optimize ElasticIndexingService #15227

merged 7 commits into from
Feb 9, 2024

Conversation

MikeAlhayek
Copy link
Member

@Skrypt perhaps this is a more interesting PR that the other one?

@Skrypt
Copy link
Contributor

Skrypt commented Feb 1, 2024

Yes, it is.

.ToList();
}

if (indexSettingsList.Count == 0)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid Any when possible :)

@MikeAlhayek
Copy link
Member Author

@Skrypt I did a benchmark to iterate over 1000 integers. Result summery is speed vs allocation!

image

Using List is faster but comes at the cost of allocation more as you expected. I'll modify the code to no use the list.

Copy link
Contributor

github-actions bot commented Feb 2, 2024

This pull request has merge conflicts. Please resolve those before requesting a review.

@MikeAlhayek
Copy link
Member Author

@Skrypt are you good with this PR?

@MikeAlhayek MikeAlhayek merged commit 34abfa2 into main Feb 9, 2024
5 checks passed
@MikeAlhayek MikeAlhayek deleted the ma/es-indexing branch February 9, 2024 00:07
urbanit pushed a commit to urbanit/OrchardCore that referenced this pull request Mar 18, 2024
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.

2 participants