-
-
Notifications
You must be signed in to change notification settings - Fork 350
Closed
Description
There is some unnecessary database hits in some modules.
first, we set request.prof_file
and immediatelly call method save()
on it, but it's not necessary. because method _process_response
in the middleware will call save()
at the end.
again, method save()
is called on request after meta_num_queries
and meta_time_spent_queries
is set.
unnecessary, because the request object will be saved in the middleware in _process_response
path: collector._record_meta_profiling
in ResponseModelFactory.construct_response_model
, a Response object is created by method create()
, so it is immediatelly saved to the database. next, Response.raw_body
is set and method save()
is called in the middleware.
database hits could be decreased
Metadata
Metadata
Assignees
Labels
No labels