View Single Post
Old Yesterday, 11:25 PM   #5
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 2,514
Karma: 9656907
Join Date: Sep 2020
Device: Libra Colour
Yay, I found the bottleneck. It was a test column I created a while ago however forgot to delete:

Code:
python:
def evaluate(book, context):
    import zipfile, os
    try:
        epub_path = context.db.new_api.format_abspath(book.id, 'EPUB')
        if not epub_path or not os.path.exists(epub_path):
            return ''
        with zipfile.ZipFile(epub_path) as ep:
            for name in ep.namelist():
                if name.lower().endswith(('.mp3', '.m4a', '.ogg', '.flac', '.wav', '.wma', '.aac', '.opus')):
                    return '🎵'
    except Exception:
        pass
    return ''
Now I can run again unprefixed searches pretty instantly. And library switching looks faster.

Let me clarify that my unprefixed search results for mesopotamia on this large library return 39 results, whereas using the exact same fields BR mentioned on limit search preference return 7 results.

And by searching...

mesopotamia or comments:mesopotamia

...the same 39 results are returned.
Comfy.n is offline   Reply With Quote