Thanks, How to design a database to store into a table calculated distance
API . Please Help me to achieve this thank you.
On Tue, Feb 2, 2021 at 10:59 AM Benny M wrote:
> You could try caching your results, or even store them in the table, or
> related table. If the ads location doesn’t change,
You could try caching your results, or even store them in the table, or related
table. If the ads location doesn’t change, there doesn’t seem to be a need to
call the api every single time. Additionally, if the results aren’t needed
right away, you could queue the job of calling the api, such th
Thank you everyone. We identified the issue.
Basically we are using an API which calculates distance
between two different ads using zip code value and this help us
to show the distance of the ad from logged-in users location.
So when classifies page is being loaded, this API is called for each and
I recommend profiling the app to figure out exactly what part is slowing you
down before you do any optimization.
On January 14, 2021 9:17:46 PM CST, Salima Begum
wrote:
>Hi all,
>
>We are building a Web application, We have a classifieds page that is
>loading too slow. How to fix this issue. h
Hi all,
We are building website, Here I have written functionality for classifieds
page.
It is loading to slow because of We are prompting distance calculation in
classifieds page. By using distance API matrix based on logged in user zip
code and individual Ad zip codes from query set(database).
Thank you, Benny. We will try it and let you know.
On Sat, Jan 16, 2021 at 5:48 PM Benny M wrote:
> Ram,
> These are all pieces to a puzzle. Indexing, ORM optimization and through
> tables all add up to an efficient page render. Additionally, you could
> consider caching some of your results, us
Ram,
These are all pieces to a puzzle. Indexing, ORM optimization and through tables
all add up to an efficient page render. Additionally, you could consider
caching some of your results, using a key like ‘postal code’ - some sort of
constant that you could use as a metric/pivot. Use a cron job
Hi,
We have a similar type of challenge in our project. We will definitely try
indexing.
Basically we are currently doing like this.
1. Registered users can post an ad in Classifieds by uploading 4 - 6 images
per ad. All the ads are placed in one postgres db table. (classifieds table)
2. Same u
Also don’t forget to include Indexing.
As a general rule, any field that you perform any query against, should be
indexed.
Yes, it costs a “bit” for disk space, but indexing can dramatically increase
your query speed.
- Benjamin
> On Jan 14, 2021, at 10:44 PM, Benny M wrote:
>
Slow loading can be sometimes be caused by non-optimized or overly complex
queries. Look into prefetch_related and select_related for starters.
https://docs.djangoproject.com/en/3.1/ref/models/querysets/
Django Debug Toolbar is also a great packages for examining the interaction
between Django’
Hi all,
We are building a Web application, We have a classifieds page that is
loading too slow. How to fix this issue. how to reduce loading time of
classifieds page.
Thanks
~Salima
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscrib
11 matches
Mail list logo