Skip to content

switch osv.dev enrichment to two-phase fetch/parse with connection pooling#808

Open
furlongm wants to merge 1 commit intomainfrom
osv-dev-updates
Open

switch osv.dev enrichment to two-phase fetch/parse with connection pooling#808
furlongm wants to merge 1 commit intomainfrom
osv-dev-updates

Conversation

@furlongm
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown
Contributor

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some food for thought. View full project report here.

import requests
from requests.adapters import HTTPAdapter
errata = list(Erratum.objects.all())
elen = len(errata)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

len(queryset) reads all the records from the database and checks the length at application level. It would probably be more efficient to do this at database level via queryset.count(). Read more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant