B
B
BeArty2015-12-03 11:22:22
MySQL
BeArty, 2015-12-03 11:22:22

How to correctly load a large amount of data from a database in Django?

Installed django 1.8 on python 3.5. When loading larger pages (html) or a large amount of data from mysql, the page is not complete for the user.
For example, I installed nvd3-django, when building a small graph, everything works, but as soon as I increase the volume, the page is not fully loaded (not all data and html tags). Tried paginators, but same problem. As far as I understand, it's not about the sample itself. when issuing a large html document, the same thing is observed.
In which direction to dig?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
newpy, 2015-12-03
@BeArty

Profile your database queries. Find a bottleneck. Eliminate or dig further.
Are database queries "direct" (without django) just as slow? If you are plotting on the front, and the "output" falls, then most likely the bottleneck is in the library you are using. Moreover, it is essentially a wrapper for JS. Profile javascript work. Fortunately, Chrome can do it all in the dev panel. Shows "gags" in JS very well. Separate the snake from the hedgehog and look.

D
Dimonchik, 2015-12-03
@dimonchik2013

strange to hear about PHP problems in Python
1) surely it's not the web server? maybe breaks the connection to upstream or to the user?
2) pagination via ORM?
3) Debug mode says something?

A
Anton Agaltsov, 2015-12-03
@Archusha

Strangely, this behavior is not typical for Python.
Pagination done with Django? or via JS?
Pokapay in the settings of the web server and the database - perhaps with a large request they break the connection.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question