Opened 7 years ago
Closed 7 years ago
#28686 closed Cleanup/optimization (invalid)
QuerySet.bulk_create() doesn't need to convert the input objs into list
Reported by: | Michael Lee | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.11 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I checked and found that in this commit,
The objs are converted to list. But if objs is actually a huge generator, then possibly the performance would be hugely degraded ?
Maybe we could simply remove the the list conversion ?
Change History (1)
comment:1 by , 7 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Without the
list()
call, generators no longer work properly. Try running Django's test suite and you'll see some test failures. Feel free to reopen the ticket if you can provide a patch that passes the tests.