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

Speed up indexing through granular removal of existing data #127

Merged
merged 4 commits into from
Dec 4, 2024

Conversation

daun
Copy link
Contributor

@daun daun commented Dec 3, 2024

It kind of irked me to delete entire documents before updating them. So I tried an option that just removes existing data instead of removing the entire document.

Turns out this is great for performance: I'm seeing a 6-7% speed increase in the indexing benchmark when running it as an update of an existing index, and an 8% speed increase when only inserting. Not sure why, but it works :)

daun added 4 commits December 2, 2024 11:57
Signed-off-by: Philipp Daun <post@philippdaun.net>
Signed-off-by: Philipp Daun <post@philippdaun.net>

# Conflicts:
#	src/Internal/Index/Indexer.php
Signed-off-by: Philipp Daun <post@philippdaun.net>
Signed-off-by: Philipp Daun <post@philippdaun.net>
@Toflar Toflar merged commit 885140b into loupe-php:develop Dec 4, 2024
18 checks passed
@Toflar
Copy link
Contributor

Toflar commented Dec 4, 2024

Nice one, thanks Philipp!

@daun daun deleted the feat/remove-terms-on-update branch December 4, 2024 16:25
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.

None yet

2 participants