JoomGalleryfriends / JG4-dev

Development repository for JoomGallery v4.x
GNU General Public License v3.0
10 stars 6 forks source link

Huge image collection slows down the whole Joomla #252

Open Elfangor93 opened 5 days ago

Elfangor93 commented 5 days ago

Currently JoomGallery creates an asset record (#__assets) for each image.

This allows us to have a permissions tab in the image edit form which which we can set permissions on a image level. This way we can e.g deny the edit of a specific image for one usergroup even if this usergroup is allowed to edit images in this category. grafik

Lately we have seen that it slows down the asset table if we have a huge number of images (>20'000 images). With so many records in the asset table, each queries becomes very slow. This results in a low performance of the whole CMS because everything is using the asset table.

The only way to fix this issue would be to not store assets for images & tags. This would mean another huge B/C break, since JG3 stored assets for images. But it would also speeds up the performance of the whole website.

What do you think? Do we need ACL on image level? Do we wanna create a configuration to turn the creation of assets on or off?

AlexanderSupp commented 4 days ago

I see no reason to define different permissions for individual images in a category. The regulations at the category level are completely sufficient. In my opinion, it also makes no sense to allow permission for different regulations in the configuration. The "Own-" options can be used to regulate finer details. Keep it stupid and simple.

Elfangor93 commented 2 days ago

Another idea would be to create just one asset per category to handle permissions for all the images in the category. This way we are able to select the permissions for the images independently of the permissions of the categories.

MrMusic commented 21 hours ago

Another idea would be to create just one asset per category to handle permissions for all the images in the category.

Would the permissions tab then appear for every image? I guess this would confuse the users because they would think the setting would be separate for each image.

What do you think? Do we need ACL on image level?

I don't think we need ACL on image level. I currently have no 'use case' for this.

Do we wanna create a configuration to turn the creation of assets on or off?

Would this not make the code more complicated and slow down the performance?

Elfangor93 commented 6 hours ago

Would the permissions tab then appear for every image?

We could decide where we wanna show this. We could also add another tab in the category edit view. Something like Image Permissions.