James,
If you have the fortitude and kind heart to look at it, sure the code
base (just checked in) is here:
https://github.com/bernd-wechner/CoGs
it's the Create view on the Session model that is taking 30s to render,
no other model, and that one is the central model of interest with a
custom form that needs related model forms as well, to wit is a tad
complex and I'm experimenting with keeping it as generic as I can for
reuse later (DRY), though it is highly experimental and hacked up as I'm
learning on the fly.
I'd harboured the slight hope that there might be some experience out
there of a more general nature regarding a 30s render time on a simple
form and where Django may be sinking all that time, but of course I do
appreciate that specifics are always useful in diagnosis. Only that I'm
not really expecting anyone to wade knee deep into the code there.
So to be specific the model in question is at line 694:
https://github.com/bernd-wechner/CoGs/blob/master/Leaderboards/models.py
The view in question is at line 276:
https://github.com/bernd-wechner/CoGs/blob/master/Leaderboards/views.py
which derives from line 589:
https://github.com/bernd-wechner/CoGs/blob/master/django_generic_view_extensions/__init__.py
and the template is at:
https://github.com/bernd-wechner/CoGs/blob/master/Leaderboards/templates/CoGs/form_data.html
but it's a work in progress and full of notes and TODOs and experiments,
a learning context while constructing a tool of use ;-).
Really part of me is wondering mainly how from that view Django comes to
spend so much time doing stuff and what and I find Kcachegrind a rather
steep learning curve itself, so was fishing around for any pointers from
experience as to likely causes.
I'm a little time poor so can't push it fast and hard anyhow, (if you
look at the timeline on commits) and best clue I have as noted in first
post, so far is that it's inside of Django at_store_template_info which
has 17506 on it in the call tree which I am guessing might be a call
count, and seems large and also it seems clear that pprint.py is the
likely main consumer and so Django experience regarding where that is
used by Django might be handy. I can drill down into the code base
slowly too and will and am, but it's a big slog and learning curve.
Hence curious if experienced eyes out there have any tips that might
save me time I guess. Certainly don't expect anyone to get knee deep
into my code base, though if anyone is willing, heck mentoring is always
welcome - anyone above that would surprise me in a sense. I'd be
appreciative no less, just not expecting it.
Kind regards,
Bernd.
James Schneider wrote:
On May 21, 2017 5:50 AM, "Bernd Wechner" <bernd.wech...@gmail.com
<mailto:bernd.wech...@gmail.com>> wrote:
I'm a tad stuck with a slow performing form, like 30s to load,
totally studding, on a high specced local dev machine.
It's a generic CreateView, and the Django Toolbar reports this:
The relevant code for your view, form, template, and model would be
super helpful. Without those, all of this profiling information
doesn't have much meaning.
-James
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to django-users+unsubscr...@googlegroups.com
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWJwNNc2h%3DDL9uiqtMCHfweavCnfnYUc3t2o8M%3D0Qj2-g%40mail.gmail.com
<https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWJwNNc2h%3DDL9uiqtMCHfweavCnfnYUc3t2o8M%3D0Qj2-g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/e9f57972-c327-3f51-84fc-cdc79c25babd%40gmail.com.
For more options, visit https://groups.google.com/d/optout.