Is your FlexGet gadget loaded when you're running calibre. If it is, what happens if you shut it down.
Calibre searches are performed on the in-memory copy of the database. A search for a title in my ~150,000 item library is instantaneous - that's on a 16GB windows 10 machine. If I want to search in a library other than the one I have open in the GUI, I use the CalibreSpy plugin - its search times are likewise instantaneous.
In your first post you wrote "
it has begun to get to the point where it needs to be closed and re-launched a few times a day due to performance issues.". In what respect are the '
performance issues' manifested - e.g. scrolling the book list, editing metadata ?
I don't, but I know of calibre users who run it 24x7 for days on end.
Pssst: other responders - I didn't look the OPs script or code. Maybe someone proficient at reading gobbledegook could take a peek. I only look at code when I want to have a sleep
BR