Open joewandy opened 4 years ago
Seems that the slowest part so far is populate_peaksamples
, especially when there are many samples.
Will change that later to do a bulk create using many=True
, see https://stackoverflow.com/questions/43435247/creating-multiple-objects-with-one-request-in-django-and-django-rest-framework.
Small fixes to make add_chebi_ids
slightly faster: https://github.com/kmcluskey/FlyMet/commit/9ccda3e6deef532a9cb157cb70500b5ce706dccc and https://github.com/kmcluskey/FlyMet/commit/84e3a50d622bdb7c886c1b2029ecb63825fee0bc.
Seems that the slowest part so far is
populate_peaksamples
, especially when there are many samples.Will change that later to do a bulk create using
many=True
, see https://stackoverflow.com/questions/43435247/creating-multiple-objects-with-one-request-in-django-and-django-rest-framework.
Done the above in https://github.com/kmcluskey/FlyMet/commit/ccdc3016a9c3b2ad126f6e74dd4ab8f02c7c636e. Peak population is much much faster now.
Notes on some things that could be done to make the pre-processing pipeline faster. Will keep adding to this as I go.
get_chebi_id
is called many times in a loop inside preprocessing. Maybe we can speed this up.