Front&BackEnd Takes Long Loading,If PG Have Many Categories?

Phoca Gallery - image gallery extension
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Front&BackEnd Takes Long Loading,If PG Have Many Categor

Post by Jan »

Hi, yes it is common problem of categories.

There are two ways:

- make displaying categories without subcategories and use then pagination ... so e.g. only 20 categories will be displayed on the site.

- or using subcategories, etc. If subcategories are used, then you need to load all the categories from database and then create a tree from them. This can be memory demanding but there is no other way. There are different ways to load categories and display them in tree but all the ways are very difficult systems (e.g. tree traversal, etc.)

So displaying categories and using subcategories in tree is nice feature but it is memory demanding :-(

Jan
If you find Phoca extensions useful, please support the project