bihealth / sodar-server

SODAR: System for Omics Data Access and Retrieval
https://github.com/bihealth/sodar-server
MIT License
14 stars 3 forks source link

Refactor SampleSheetAssayPluginPoint.get_assay_path() usage #2016

Closed mikkonie closed 1 month ago

mikkonie commented 1 month ago

In the past, I optimized assay plugins by moving irodsbackend initialization to SampleSheetAssayPluginPoint.__init__(), reducing the amount of queries.

However, it seems I didn't think this through: plugins are still calling SampleSheetAssayPluginPoint.get_assay_path() unnecessarily, usually for each update_row() command.

Each assay plugin is initialized for a single assay. Hence the assay path will always be the same. We can just set this once into a class variable in __init__() and use that variable instead of redundant function calls. Silly me.

I'll do this after #1980 as at that point it'll be easy to verify it works :)

mikkonie commented 1 month ago

Done.