Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow torrent list #811

Merged
merged 4 commits into from
Jun 16, 2019
Merged

Slow torrent list #811

merged 4 commits into from
Jun 16, 2019

Conversation

JackPriceBurns
Copy link
Contributor

@JackPriceBurns JackPriceBurns commented Jun 16, 2019

The torrents index page is actually slow to load and uses a lot of server resources, when loading the page, normally it runs around 100~ queries to generate the page, and another 100~ queries for every time you use the search bar (with 25 pagination).

If you double the pagination the amount of queries also double!

After this PR the page takes around 20~ queries to load the page. And this amount doesn't change if you increase the pagination.

I decided to leave the pagination the same as I was unsure if you wanted to increase this limit or not?

The same logic used to speed up the home page is used here.

Furthermore, I updated the movie database client to cache the data using any cache driver that laravel supports. Before you were forced to use redis, which I don't have on my local machine. (I can revert this if needed)

@HDVinnie
Copy link
Collaborator

Thanks for the contributions @JackPriceBurns

@HDVinnie HDVinnie merged commit fc8294e into HDInnovations:master Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants