beets/beets
Sam Thursfield 3fec6d347a Use caching in plugins.find_plugins()
This function is called from library.Item._getters(), making it a hot
path when exporting data. We cache plugin instances but previously we
reran `import` for each module on each call. We now return the cached
values providing a speed boost for `beet export`.

This has a small effect on `beet ls` speed: for me it went 11.00s ->
10.40.

It had a significant effect on `beet export` speed when combined with
https://github.com/beetbox/beets/pull/3762/.

Before:

    $ time /home/sam/.local/bin/beet 'export' '--library' '--format' 'jsonlines' '--include-keys' 'artist,title,path,mb_artistid,mb_trackid' 'artist+ title+' > /dev/null
    Executed in   25.13 secs

After:

    $ time /home/sam/.local/bin/beet 'export' '--library' '--format' 'jsonlines' '--include-keys' 'artist,title,path,mb_artistid,mb_trackid' 'artist+ title+' > /dev/null
    Executed in   10.49 secs
2020-12-15 14:16:09 +01:00
..
autotag Add musicbrainz genre config option. 2020-10-30 08:27:04 -07:00
dbcore Use null instead of model_type() 2020-10-23 10:10:21 -04:00
ui Merge pull request #3765 from jackwilsdon/plugins-flag 2020-10-25 16:39:46 +00:00
util Merge pull request #3088 from rubdos/reflink 2020-11-27 13:29:10 -05:00
__init__.py minor fixes and changelog entry 2020-02-25 15:23:52 +01:00
__main__.py Simpler __main__ docstring (#2453) 2017-02-25 13:39:14 -05:00
art.py Woops, this needs to be explicitly multiline 2020-02-22 12:43:22 -05:00
config_default.yaml Merge pull request #3088 from rubdos/reflink 2020-11-27 13:29:10 -05:00
importer.py Add reflink routine 2020-07-22 18:00:25 +02:00
library.py assert False on unknown move operation 2020-11-26 13:05:10 +01:00
logging.py s/utf8/utf-8/ in all encoding/decoding contexts 2016-09-06 23:10:24 -04:00
mediafile.py mediafile: replace with a wrapper around mediafile 2019-05-29 09:35:14 +10:00
plugins.py Use caching in plugins.find_plugins() 2020-12-15 14:16:09 +01:00
random.py random: beets.util.random -> beets.random 2019-04-07 18:46:11 +10:00
vfs.py Standardize __future__ imports without parentheses 2016-02-28 15:03:51 -08:00