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 ProductOpener::Tags::remove_stopwords() #2607

Closed
stephanegigandet opened this issue Nov 17, 2019 · 1 comment
Closed

Optimize ProductOpener::Tags::remove_stopwords() #2607

stephanegigandet opened this issue Nov 17, 2019 · 1 comment
Assignees
Labels
🐛 bug This is a bug, not a feature request. 🚅 Performance

Comments

@stephanegigandet
Copy link
Contributor

remove_stopwords() takes a lot of time during imports. (found during investigation of #2563 by @zigouras and @hangy )

e.g. test run with 500 dummy products:

image

The function currently checks each stopword one by one.

We can speed up by making one single regular expression to check all stopwords.

@stephanegigandet stephanegigandet added the 🐛 bug This is a bug, not a feature request. label Nov 17, 2019
@stephanegigandet stephanegigandet self-assigned this Nov 17, 2019
@stephanegigandet
Copy link
Contributor Author

10X speed increase:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug, not a feature request. 🚅 Performance
Projects
None yet
Development

No branches or pull requests

1 participant