-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Do not write unchanged items to the library in FtInTitle #5718
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
Conversation
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
That doesn't make a whole lot of sense, the speedup should be closer to a factor 32 then. It seems like more is going here than just parallelization, possibly the behavior actually changed in some unintended way? In any case, this PR seems to contain a bunch of unrelated changes and it's quite hard to get a reasonable overview of what really changed. It would be helpful if it could be focused on just introducing the parallelism without any extra changes to the plugin logic or logging (if that is actually relevant for the speed-up, it would be useful to point that out). |
Yes, you're absolutely right. I looked at it again and I think the main performance improvement comes from only calling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
Files not reviewed (1)
- docs/changelog.rst: Language not supported
62f7ed5
to
d2a31ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
I went ahead, rebased this on master & squashed.
For reference, the fact that this allows for such a large speed-up makes me wonder:
|
some work following up my review of #5718 - add typings - refactor the logic in the core `ft_in_title` function, motivated by the fact that I found this more difficult to read than necessary during the review
Description
FtInTitle performs a library store operation for every item it processes, whether or not the item has changed. By limiting the
item.store()
call to only those cases when the item has changed, the plugin’s performance when processing an entire library improves by two to three orders of magnitude.To Do
docs/
to describe it.)docs/changelog.rst
to the bottom of one of the lists near the top of the document.)