tilburgsciencehub / music-to-scrape

A fictitious music streaming service with a real website and API so you can learn how to scrape!
https://music-to-scrape.org
3 stars 6 forks source link

speed of landing page #30

Closed hannesdatta closed 1 year ago

hannesdatta commented 1 year ago

hey @thierrylahaije - I resized the pic on the landing page, but the speed hasn't increased substantially. I believe there must be a database call that takes a very long time to load.

Can you check which one that is?

We can them devise a strategy for making that query faster (or, you can suggest one).

Curious to hear!

thierrylahaije commented 1 year ago

Hi Hannes,

I checked the speed of the queries at the homepage. At first when I check, the speed was about 1.24 seconds. I was able to increase the speed up to 0.02 seconds, an increase of approximately 98%. More details below (summary):

hannesdatta commented 1 year ago

I checked, but it still seems buggy:

image (e.g., a bunch of 1s - while there should just be one...)

image

Finally, just out of curiosity: what's the reason you switched main.py to app.py, btw?

Good idea to have an index, but these issues still need to be resolved.

thierrylahaije commented 1 year ago

About these points: