Jump to content

Archived

This topic is now archived and is closed to further replies.

burt

Open discussion on speeding up osCommerce

Recommended Posts

Open forum for discussing how we can speed up osCommerce to make it as fast as possible. From image manipulations to htaccess to code optimizing. Any ideas you have, please bring to the table.

 

Easy as ABC APC ;)


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites

Well, heres the short list, some Ive tried, some I'm still getting around too (static-cdn)

 

CDN for all major javascripts with fall back of course - jQuery, jQuery-UI, Bootstrap, etc;

CDN for all major stylesheets, such as bootstrap, jquery-ui, and design an efficient fall back for them.

 

.htaccess has some miricle drugs available that really do a lot in terms of increasing page speed - HTML5 BOILERPLATE has a very well commented one available - - and they also provide details for making the most out of IIS setups.

 

compress the overall code server side.

 

Image thumbnail creation, either on first page load or when uploading the image. It doesn't really matter after the first thumbnails are created, so long as the process of creating them is NOT memory intensive.

 

use more functions - which I believe is happening in 2.4, you know, just query the data with a function rather than write a new query to reproduce data.

 

shorten existing functions where applicable, droping some of the longer if else statments in favor of the ?'':''

 

Combine code wherever possible to avoid having to close the php code untill truely needed.

 

Remove the last closing tag on each page


Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Share this post


Link to post
Share on other sites

I have a lot of ideas, but if I think what is missing most for new users is thumbnailer ( just look at the mystore section and you'll see)

Image thumbnail creation, either on first page load or when uploading the image. It doesn't really matter after the first thumbnails are created, so long as the process of creating them is NOT memory intensive.

I vote for image thumbnailer on first use - it does matter if you ftp lots of images across, or if you decide to change the size of your thumbnails

@@mattjt83 has been busy with this too lately


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

Work smarter, not harder.

You assume that there is a shopowner, in reality there are multiple people with different skill sets, different computers that can add products to the catalog, the less they need to do know/do to get a product added to the site, the better.


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

yes, that is an option - but what is the disadvantage, what does FWR Media think about this ?


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

using APC and caching the configuration data speeds up osCommerce really good.

I posted an APC code snippet earlier

http://forums.oscommerce.com/topic/389955-useful-snippets-of-code/#entry1655411


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

I don't see why it couldn't be in the core. You could have a configuration setting to turn it on and off if you wanted. I think most people would benefit from it being on. Automatically create thumbnails for large images to improve site load time? True / False


Matt

Share this post


Link to post
Share on other sites

And using an existing thumbnailer should not be needed eighter, php has plenty of image resize functions so making one specifically for oscommerce should not be that complex.

Share this post


Link to post
Share on other sites

We're loathe to add on any addon's where the person who made the addon is uncommunicative and/or uninterested in osCommerce.

 

My idea would be to ascertain by way of shopowners (like you, Carine, Steve and so on) which addons are invaluable, and if these are well coded put their links into a pinned "After you install you should consider installing these addons" type of post.


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites

Here is another of his speeding up contribution I use to retrieve categories.

 

Parent_id query optimisation

http://addons.oscommerce.com/info/5011

 

If you could combine such a thing with multiple parent categories discussed over in the navigation/categories thread, you have a winner ;)


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

  • Not closing php tags is a horrible idea, IMHO and just doesn't 'feel' right - like not bothering to close a conditional statement.
  • Any cacheing technologies (such as memcached, APC) should always be switchable, as this is a server function and methods change.
  • Ensure any/all database tables are not tied to a specific mySQL Engine - perhaps a choice of ISAM, innodb (with a default), during installation.
  • A one-off thumbnailing of an image during upload (with selective regeneration) seems to be a better option (less resource hungry), for busier sites. Admittedly, when uloading a large quantity of images, say with FTP, the reverse becomes true. Conclusion: it depends on the size and scope of a particular site, in addition to working practices.
  • A comprehensive review of SQL statements, to improve the use of indexing, thus speeding up larger/complex stores in particular.
  • (Don't get the software bloated, like some others.)

Could be that I'm biased though, eh Burt? ;)

Share this post


Link to post
Share on other sites

Not closing the page PHP tags - would that speed up anything ? I can't imagine it would...anyone got any data.

 

@@ejsolutions - not using ?> is recommended if the page is entirely PHP (with no html output) as it prevents the whitespace errors. You - biased...never :D


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites

I don't see why it couldn't be in the core. You could have a configuration setting to turn it on and off if you wanted. I think most people would benefit from it being on. Automatically create thumbnails for large images to improve site load time? True / False

 

I agree with Matt, being a shop owner myself the only thing I can comment on is how a particular addon works, I have tried quite a few thumbnailers over the years but this particular one by FWR Media works really well and significantly speeds up loading times.

 

We're loathe to add on any addon's where the person who made the addon is uncommunicative and/or uninterested in osCommerce.

 

I fully understand your point of view and in a way I agree, but on the other hand, why bother about someone's lack of communication, if the work done is of a good standard then why not include it in the core?

Just my opinion.


~ Don't mistake my kindness for weakness ~

Share this post


Link to post
Share on other sites

The following is what an EX host kept telling me, but I don't know about the veracity of these affirmations as their customer service wasn't a particularly good one.

 

Anyway perhaps the coders here will know if there is food for thought here or not.

 

According to them osC uses too many MySQL queries, most of them being too slow (taking more than 4 seconds to complete), with some queries hanging and/or causing to lock tables.

They wanted me to optimize the MySQL queries by, for example, installing a SQL caching plugin.


~ Don't mistake my kindness for weakness ~

Share this post


Link to post
Share on other sites

Whats need? The simple the best.

 

From addons area:

- configuration cache

- url cache

- thumbnails

and js/css/image expire time managment.

 

By core:

- like v2.4 (separate bootstrap, functions/classes, template)

 

By shop builder:

- clear coding and less errors

 

By shop owners:

- to ask optimal requirements

 

By customers:

- more simple shopping and navigations, good informations


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

As a store owner I though I would jump in - upgrading from 2.2 MS2 to 2.3.3 is still rather fresh in my mind (June) and I went through extensive testing (with my VERY limited skill) on http://gtmetrix.com/ to get my store as fast as possible. Here is what what made the greatest difference;

 

1) thumbnailer (I used kiss... but really what ever works... I see know reason why a thumbnailer should not be included in the core... just my 2 cents).

 

Devils Advocate: Whats wrong with getting the shopowner to upload appropriately sized images ?

@@burt, as a store owner, this is VERY in-practical. I have 2500 items from 100 different vendors (typically I get my pics from the vendor) in my store... it would be a full time job to take and resize images. A thumbnailer will improve the lives of ALL OsC users...

 

2) htaccess improvements - similar to the ones found here http://addons.oscommerce.com/info/8927 - If I remember correctly this made a huge difference in page speed (less of a dif. in yslow)

 

3) Optimize the cat boxes (I know this is on another discussion)

 

What I have always wanted to try (because I have WAY to much css and js), but is WAY beyond my skill (even after reading some of the tutorials out there - I still don't get it) - CDN and cookie free domains... I know this kinda thing will never make it into the core.

 

For the future, I know Gzip and caching is built in to the core, but;

 

1) If I remember correctly the Gzip made ZERO difference (on or off) in either page speed or yslow (likely something in the way my store is configured?)

2) I believe there are many new/better cache methods - when was the last time this was looked at in the core?

 

Again, just my 2 cents - as a store owner...

Share this post


Link to post
Share on other sites

In 2.2 versions of oscommerce a thumbnailer would have helped enormously. In the latest version where you have the ability to add a small and large images, I personally cannot see the point of having one. I receive many images from many suppliers and all of the images need resizing any way. I also add a watermark to all of the product images, so I have to spend time altering images anyway. When creating a product I add both large and small images. A thumbnailer would be no use, or no help to me. I think that something to do with the cache settings may make a difference, but what that is I have no idea.

 

The only other thing I have looked at doing something with to speed things up a bit was to read through the optimise thread that was started on these forums many years ago. Then I seem to remember was mainly to do with reducing the number sql queries with the categories menu. People would know better than me how to achieve this.

 

Bad coding is what seems to slow most sites down, so the coders here would again know more than me on this.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

hi guys,

 

more then 10 years ago I tuned a osc 2.2 for serious top performance.

 

My approach was implementing a request profiler with measurement points, which allowed me to see for any page request where the time is consumed and what could be optimised. If someone is interested I can put that code together again? just give me a note

 

regards

cord

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

@@Gergely

 

Hi,

 

I have found and incoprorated the configuration cache, but cant find any reference to the following contributions:

 

- url cache

- js/css/image expire time managment

 

do you have a link to these please?

 

Many Thanks


Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Share this post


Link to post
Share on other sites

×