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

Implement cache engine - fixing slow loading time #61

Open
GoldMnaPro2014 opened this issue Apr 27, 2020 · 11 comments
Open

Implement cache engine - fixing slow loading time #61

GoldMnaPro2014 opened this issue Apr 27, 2020 · 11 comments
Labels
Milestone

Comments

@GoldMnaPro2014
Copy link

When the site has more than 30,000 films, it loads slowly, how to fix it?

@jreklund
Copy link
Owner

Get a faster server I guess, this project don't have any caching engine.

@GoldMnaPro2014
Copy link
Author

Are you planning to add a caching system in the future?
And when to wait for the upgrade to version 4?

@jreklund
Copy link
Owner

In version 3 no, it will be left as is. I will only update dependencies, fix bugs and security issues. At the moment there are no new planned additions, as it works as intended (for my use).

I currently have under 1k movies, and only tested it with 3k. 30k aren't really a personal website anymore, so I never tested that many.

Haven't written a single line of code, I'm busy contributing to other projects at the moment. So can't give any ETA on version 4. If the framework I choose have support for a caching, I can add it. Won't really write my own.

Any specific part that are slow? Have you limited the index page with "Results per page", or are you trying to load 30k titles at ones?

@GoldMnaPro2014
Copy link
Author

It would be nice to add caching mode

The output to the page I currently have 21 films per page.
When the site had 3K movies, the site loaded in 0.5-1 seconds, and when 30K, the site began to load in 4-10 seconds

@jreklund
Copy link
Owner

That's probably because everything are stored as 1:1 in the database. There are no relation tables, so it grabs genres from 30 000 rows and format from 30 000 rows. Every time. This information are never cached.

Titles are at least limited, if you have limited "results per page". The only thing you can do it speed it up are to remove those from displaying.

In: /includes/movie.search.inc.php

// The movie categories
//$moviecategories = $moviedm->getCategories();
$Website->assign("categories", array());

// The movie formats
//$movieformats = $moviedm->getFormats();
$Website->assign("movieformats", array());

@jreklund jreklund changed the title Loading slowly Implement cache engine - fixing slow loading time Jun 13, 2020
@jreklund jreklund added this to the v4 milestone Jun 13, 2020
@GoldMnaPro2014
Copy link
Author

I tried everything, nothing works, how to fix this problem?
Can you implement caching?

@jreklund
Copy link
Owner

jreklund commented Jul 9, 2020

I don't have 30k in my database, so I can't test it out. So did you try my suggestion and disabled categories and movie formats?
That are the only thing I can think about, except the obvious; Changing to a better server.

I have market caching for V4, as I don't have the need for it myself and it ain't a problem for normal users.

@GoldMnaPro2014
Copy link
Author

So did you try my suggestion and disabled categories and movie formats? - Yes
The question is, after about how long to wait V4?

@jreklund
Copy link
Owner

Hi, then I'm afraid I can't give you any more help, as I don't have that big of a database to test on. Unless you are willing to dump it and send it to me. You can find my email on my website, on my github-profile in case you want to do that.

Version 4 status are still the same:

Haven't written a single line of code, I'm busy contributing to other projects at the moment. So can't give any ETA on version 4.

@GoldMnaPro2014
Copy link
Author

That's it, I sent you everything to the E-MAIL: [email protected]

@jreklund
Copy link
Owner

Hi, just took a quick look at it. And it's no longer a php4dvd system, I can't run it off the original code. The database itself dosen't match anymore. It's heavily modified with the homepage loading all directors, countries, casts, years and categories. All of those except years will have a heavy impact on your performance.

You are also loading movies in the sidebar and latest movies based on genres and that's will also slow you down. It wouldn't even matter if I cached categories and movieformats, it would still be slow to you. This requires a complete re-write of the database. You have also stripped away the license of said software, not cool man...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants