﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35853	Disable garbage collection during transaction.atomic.	Matej Spiller Muys		"We noticed that occasionally atomic blocks are keeping transaction open for longer than expected.
This was traced to GC being run during atomic operation affecting the DB performance since locks are released too late.

We added tracing to GC and transactional.atomic() and we noticed that GC is keeping DB transaction longer from 0.5 to 1 second.

To avoid that we extended atomic object to call gc.disable before creating new transaction and gc.enable after commit or rollback.
This positively impacted database load. Because we use mod_wsgi with a lot of workers and horizontally scaling the app it happens quite often that GC is run inside a DB transaction making whole system slower.

It would be nice to have this buildin in Django (opt-out, opt-in) for better DB performance.
"	New feature	closed	Database layer (models, ORM)	5.1	Normal	wontfix	gc, atomic, transaction		Unreviewed	0	0	0	0	0	0
