#28146: PostGIS: Django 1.11 adds two extra queries: SELECT 
postgis_lib_version()
and SELECT version()
-------------------------------------+-------------------------------------
     Reporter:  George Tantiras      |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  GIS                  |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by George Tantiras):

 Thank you, I will try the `CONN_MAX_AGE` setting, there is no form widget
 in the [http://bit.ly/2pwhBUz page].

 During the refactoring and profiling of my view, which suffered one or two
 concurrent changes along with the 1.11 upgrade, I discovered the added
 queries.
 It is probable that I rushed to report an apparently unjustified bug.

 I paid closer attention to results of the debug toolbar:
 {{{
 Django 1.10: 8 queries on the first load which decrease in 6 queries on
 the second load. Time:  51.72ms
 Django 1.11: 10 queries at every load. Time: 42.28ms
 }}}
 The above seem to suggest that the added queries are not the issue
 especially if they are not unintentional.

 However, the cpu time is dramatically increased from 1.10.7 to 1.11.
 I post the results for the record in case the make some sense:
 {{{
                         Django 1.10.7                    Django 1.11
                         -------------                    -----------
 User CPU time           756.000 msec                    1260.000 mse
 System CPU time         84.000 msec                     172.000 msec
 Total CPU time          840.000 msec                    1432.000 msec
 Elapsed time            869.506 msec                    1424.191 msec
 Context switches        3673 voluntary, 65 involuntary  10557 voluntary,
 177 involuntary

 Timing attribute        Timeline        Milliseconds since navigation
 start (+length)
 Browser timing
 domainLookup            4 (+0)                          9(+0)
 connect                 4 (+0)                          9(+0)
 request                 5 (+904)                        11 (+414)
 response                909 (+0)                        425 (+0)
 domLoading              910 (+279)                      426 (+273)
 domInteractive          1152                            662
 domContentLoadedEvent   1160 (+15)                      669 (+15)
 loadEvent               1189 (+0)                       699 (+0)
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28146#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b747b515d3b1b4bbe72627c107a66729%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to