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

[Feature Request]: Use sql to delete all unlinked entries simultaneously #617

Closed
3 tasks done
Toby222 opened this issue Nov 30, 2024 · 0 comments · Fixed by #696
Closed
3 tasks done

[Feature Request]: Use sql to delete all unlinked entries simultaneously #617

Toby222 opened this issue Nov 30, 2024 · 0 comments · Fixed by #696
Labels
Priority: Low Doesn't require immediate attention TagStudio: Library Relating to the TagStudio library system Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion

Comments

@Toby222
Copy link
Contributor

Toby222 commented Nov 30, 2024

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

Description

As per this TODO:
Currently when deleting unlinked entries, they are deleted one-by-one, only so they can update the progress bar.
I believe it would be better to let the progress bar be indeterminate and speed up the deletion by deleting all items in parallel.
In brief testing the speedup was significant enough that the progress bar was no longer visible long enough for the lack of visible progress to matter :^)

Solution

Instead of calling remove_entries with one id at a time, pass all relevant IDs simultaneously.

Alternatives

No response

@Toby222 Toby222 added the Type: Enhancement New feature or request label Nov 30, 2024
Toby222 added a commit to Toby222/TagStudio that referenced this issue Nov 30, 2024
This technically removes the usefulness progress indicator, but brief
testing on my end had it delete ~8000 entries in less time than it took
me to see if the progress indicator was properly indeterminate or not
@CyanVoxel CyanVoxel added Type: QoL A quality of life (QoL) enhancement or suggestion TagStudio: Library Relating to the TagStudio library system Priority: Low Doesn't require immediate attention labels Nov 30, 2024
@CyanVoxel CyanVoxel moved this to 🏓 Ready for Review in TagStudio Development Nov 30, 2024
@CyanVoxel CyanVoxel moved this from 🏓 Ready for Review to 🍀 Backlog in TagStudio Development Nov 30, 2024
@CyanVoxel CyanVoxel moved this from 🍀 Backlog to 🚧 In progress in TagStudio Development Nov 30, 2024
CyanVoxel pushed a commit that referenced this issue Jan 11, 2025
* feat: Delete all unlinked entries at once (#617)

This technically removes the usefulness progress indicator, but brief
testing on my end had it delete ~8000 entries in less time than it took
me to see if the progress indicator was properly indeterminate or not

* fix(fmt): remove unused import

* fix: wasn't able to delete more than 32766 entries

* chose: ruff check --fix

* fix: address review comment

---------

Co-authored-by: Tobias Berger <toby@tobot.dev>
@github-project-automation github-project-automation bot moved this from 🚧 In progress to ✅ Done in TagStudio Development Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Doesn't require immediate attention TagStudio: Library Relating to the TagStudio library system Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion
Projects
Status: ✅ Done
2 participants