ayz1 Posted May 21, 2016 Posted May 21, 2016 When in admin editing a product the browser hangs for a few seconds and I get a script error. The store has about 8000 products. I've tried lading Firefox in safe mode but get the same error message. Hangs in other browsers as well. Anyone having the same problem or know a fix? I've seen this post but not sure if related or is still relevant. Quote
Dirty Butter Posted May 21, 2016 Posted May 21, 2016 I see this from time to time as well, and we have about half as many products as you. We may have more images than you, however. I have seen it on other websites, as well. Try using Firebug and watch the Net processes and see what the waterfall shows. Quote
bsmither Posted May 21, 2016 Posted May 21, 2016 When bringing a product up for editing, CubeCart uses the AJAX functionality of jQuery to fetch a listing of all images (to allow for the assigning of images to the product) and again to fetch a listing of all digital files (to allow for the assigning of a file to make this product a digital download). Due to a minor programming mistake, CubeCart will also fetch a second and a third entire Add/Edit product page via those two AJAX calls. In my internal development environment, all this still takes about six seconds for the page to become usable. Add to this the latency incurred with a less than blazingly fast internet connection, fetching perhaps 8000 image filenames (not the actual images, and this would be not as time consuming if the 8000 images were managed in categorized folders), and a couple of other considerations, the browser comes to realize that the AJAX function is taking way too long - maybe it has become unresponsive (infinite loop, etc). Depending on the browser, you may be able to check the box "Do not ask again" and "Continue", such that the browser will always remember to keep the script running if this should ever happen again. Quote
Dirty Butter Posted May 21, 2016 Posted May 21, 2016 Quote Due to a minor programming mistake, CubeCart will also fetch a second and a third entire Add/Edit product page via those two AJAX calls. Is this fixable, or not worth the effort due to minimal impact? Quote
bsmither Posted May 21, 2016 Posted May 21, 2016 See: https://github.com/cubecart/v6/issues/855 Probably minimal impact UNLESS an installation uses hooks that run for each page load, which could introduce unintentional consequences if run more often than planned. Fixing this could shave off 3-5 seconds delay until the page is ready to be used. Quote
Dirty Butter Posted May 21, 2016 Posted May 21, 2016 I referenced this thread in a comment on #855. As our store gets bigger by the day, I see this delay more and more. Quote
bsmither Posted May 21, 2016 Posted May 21, 2016 Again, to be clear, it is the extra full-page requests that add unnecessary work to the process. There will still be the work of getting the list of images and digital files -- that won't change -- and having the images managed in folders will keep the initial amount of that work to a minimum. Quote
Dirty Butter Posted May 21, 2016 Posted May 21, 2016 I started moving my images to folders, but realized I could not upload from the product listing Image tab into a folder. That made double work for me, so I quit doing it. I think I made a GitHub request about it. https://github.com/cubecart/v6/issues/510 Quote
ayz1 Posted May 21, 2016 Author Posted May 21, 2016 Thought deleting some out of stock items might lighten the load but the image file references are not deleted so the image of the deleted product still gets loaded into the image file list. Quote
bsmither Posted May 22, 2016 Posted May 22, 2016 If an image(s) apply to only a specific product, and that product is no longer visible on the storefront, then in File Manager, create a folder named "notavailable" and move those images into it. CubeCart fetches image filenames one folder at a time -- starting with the root image folder. As you click on image sub-folder icons, then that is when a separate and distinct AJAX request for the list of filenames happen. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.