Unresponsive Script, slow loading - Product Edit with many Custom Field values

Started by biltong, July 25, 2016, 21:45:37 PM

Previous topic - Next topic

biltong

When I edit a product with about 70 image custom fields, I get a Firefox browser Warning message 'Unresponsive Script... Click to continue' and the product edit page takes about 50s to load.

I then make changes to the custom field values and Save, which kicks me back to the VM Control Panel page without saving the changes.

The product is a child of a parent pattern product, inheriting about 40 image custom field values as well as having about 30 custom field values of its own.

I have increased PHP values as per other posts on the forum - see attached settings with no improvement at all.

Any ideas please?

Milbo

I need to look at your product. Do you also use a lot different custom proto types? or mainly one custom proto type.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

biltong

Hi Milbo,

Here's the product detail page on the front-end https://starfish.directrouter.com/~vc2598u2m59543r9/wigs/cassidy

The product has a pattern parent which also has a pattern parent - so there is a two-level pattern hierarchy.

I've attached images of the product's CF tab from back-end and also for the pattern parents.

If you need access to the back-end, should I PM you?

Thanks

PRO


biltong


Milbo

nice shop, but complex setup. But this is not a general VM problem. There are different methods/ideas to handle it. When I should take a look on your product, you need to buy support at extensions.virtuemart.net
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

biltong

Quote from: Milbo on July 28, 2016, 09:44:42 AM
nice shop, but complex setup. But this is not a general VM problem. There are different methods/ideas to handle it. When I should take a look on your product, you need to buy support at extensions.virtuemart.net

I purchased supporter membership on 11/4/16....

biltong

I have just over 1000 Virtuemart Media files.

As I add additional Image Custom Field values to the product, loading the product edit page gets increasingly slower. Starting with none, it is quick. Add 10 and it is quite slow. Add another 10 and it is much slower. Add another 10 and it is impossibly slow.

I reckon this is because the image Custom Field on the Custom Field tab provides a dropdown selection search, preloaded with values. Now if there are 1000 media files and 50 custom field values, that makes alot of data to be loaded.

What do you think Milbo?

jjk

At present I can't look it up on my own test installation, because for some reason the dropdown selection doesn't work within the custom fields in my backend.
Does the system load all your images in the backend/custom field tab? Had a short look at your site yesterday, but didn't post a reply, because I can't test it. When you had 70 image custom fields added to the product, the main problem in the frontend was imho the way browsers load images. Browsers load one image after another, so your live site spent most of the time to waiting for one image to finish loading before starting to load the next one. Caching the images doesn't help a lot in this case either, because the site visitor's browser still loads one after the other - and loading 70 images with a total of approximately 3.5 mb takes quite a while.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

biltong

jjk, When you say
Quotethe dropdown selection doesn't work within the custom fields in my backend.
, what exactly is happening? I problem I had was I needed to save the product after adding the CF images instances before the image dropdown 'search' would work properly.

If I understand your question correctly, the back-end Product Edit page Custom Field tab DOES load all the media files into the drop-down for each CF image instance added to the product. So for a product that has 35 colour options (CF image instances) added to it and there are 1000 media files added to VM, that is a considerable amount of data being loaded (and db queries I guess) to edit a product (35 x 1000).

I'm happy with the front end of the site - the test product has more 'Colour Option' images than reality. The most a product will have is about 35 so this is bearable.

biltong

Here's a thought @Milbo, can we change the CF Image dropdown/search to only fire off a search when a button is clicked rather than loading it when the page loads? Another idea, if there are multiple Image CFs assigned to a product, how about performing this loading only once on page load and use it for all instances.

I'm not down with the code so difficult for me to understand exactly what it is doing but there must be a more efficient way of dealing with this.

PRO

Biltong,


with the custom fields NOT being "cart attributes"

Why not have "groups" you display on frontend.
You can use customfield "editor" and have a whole display of the images.
You can even use a modal pop up.


OR
You can actually also do this a different way.

Use customfield IMAGE , for your main 3 images.

Then, use the main image & additional images as your color displays.
Thats a lot of images, and those scroll bars make me wonder why you assign all of them in the first place.




Milbo

The problem is, at least in this example, that he has a lot inherited customfield, which are disabled by other customfields.

I think all images should be added as normal media, maybe? you can limit the number of output and use always the 4th one as your series.
Or maybe you should remove the some of the colours, which are most time anyway not available. I understand it is simpler to administrate. Looks like you use already the adminlist, right? It is imho the fastest. Maybe it makes sense in your case to write a special plugin for this problem.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/