Batch huge mass loading by directly writing into the database

Phoca Gallery - image gallery extension
User avatar
phunsoft
Phoca Member
Phoca Member
Posts: 33
Joined: 06 Sep 2023, 20:32

Batch huge mass loading by directly writing into the database

Post by phunsoft »

I've got a site with a really large gallery (not Phona Gallery), some hundred categories and some thousand images. Unfortunately, that software does not scale well. I'm loogking into switching to another software and am thinking of Phoca Gallery.

I wonder if it is feasible to load the DB tables pfx_phocagallery, and pfx_phocagallery_categories from a converted export of the tables from the current software. Will Phoca Galley generate the various smaller images upon first access?

I would like to avoid loading all categories and images through the usial interface. It's just too many.

Any experience regarding performance and scalability with that large a gallery?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49377
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Batch huge mass loading by directly writing into the database

Post by Jan »

Hi, I don't know your previous solution, so hard to give any clue advice about export and import. Phoca Gallery has "Multiple add" feature which transforms all images to thumbnails, all folders and subfolders to categories and subcategories, so adding new images can be fast:



Phoca Gallery uses pagination and categories, so if rightly set, this can manage a lot of images because on one page only images from selected category or only images inside pagination are loaded. By such systems the most problematic part is count of categories, because if you load images, they are limited by pagination or category, but if you load e.g. category tree, there all categories needs to be loaded.

Jan
If you find Phoca extensions useful, please support the project
User avatar
phunsoft
Phoca Member
Phoca Member
Posts: 33
Joined: 06 Sep 2023, 20:32

Re: Batch huge mass loading by directly writing into the database

Post by phunsoft »

Hi Jan
Thanks for the answer. One problem I'm facing is that in the current gallery, the album (categories) have been created manually more or less unreleated to most of the directory names, and the direcroties containing the related images are not named in way to be used to create categories automatically.

I'd easily be able to build SQL INSERT statements for Phoca Gallery's tables based on the SQL export from the old gallery. Advantage would be that the SQL table for the catgories does have the proper "album" names. And the images table has the full path to the images.

Thats why I was asking what would happen when I load the Phoca Gallery tables this way, i.e. outside of Phoca's control. So the tables were loaded completely, but non of the resizes images would be present.

Regards
Peter
Post Reply