There are many possible causes of slow imports
-
Time spent in fetching data. This includes fetching the data(actual advisories + Version API calls) : Consider async for this.
-
Time spent in processing the data. This include converting data into Advisory. I can't think these can be significantly optmised further
-
Time spent in writing data to DB. This is possibly the bottleneck. Maybe a better indexing strategy, and reducing db queries.