Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Slow site when SEARCH-box is used


SamBIT

Recommended Posts

Posted

Hi! The shop I´m building goes very slow when:require(DIR_WS_BOXES . 'search.php'); is used in column_left.php

 

It is not the search-function itself that is slow finding products but the site is slow when scrolling up and down.It cannot be seen in for example the browser Safari that I use on my Mac but in Explorer it is so slow. First I thought it depends on all pictures used on the site, but if the search.php is commentet out by:// require(DIR_WS_BOXES . 'search.php');

the site goes as smoothly as it should.

 

Anyone that could help with this?

Thanks! (Ps. Thanks for a really good forum-place by the way!)

 

// Sami

Posted

Sami,

 

Are you using the standard search box or have you updated it to the Ajax version. The standard search box does not load any 'pre-data' and begins the function once a keyword is entered. So this would not slow down your site at all.

 

 

Chris

Posted

Hi and thanks for quick reply!

 

No I have not changed anything. The search box is the original.

 

But after some research in the SEARCH.PHP I have found out that it is the function tep_draw_input_field that slows everything down.

 

// Sami

 

 

 

 

Sami,

 

Are you using the standard search box or have you updated it to the Ajax version. The standard search box does not load any 'pre-data' and begins the function once a keyword is entered. So this would not slow down your site at all.

 

 

Chris

Posted

Hi!

 

I got some additional information now..

 

Did a fresh re-installation of the OSC without ANY modifications at all. Just copied all pictures to the IMAGE map.

 

But even now the site goes slow when scrolling up and down.

 

BUT if the:

require(DIR_WS_BOXES . 'search.php');

is commented out in column_left.php, the site goes as smooth as it should againt.

 

Seems to be the SEARCH-function that is very slow? Or could it be slow MYSQL calls because of wrong setting for that maybe?

 

Greatful for any help!!

 

// Sami

Posted

BUT if the:

require(DIR_WS_BOXES . 'search.php');

is commented out in column_left.php, the site goes as smooth as it should againt.

 

Seems to be the SEARCH-function that is very slow? Or could it be slow MYSQL calls because of wrong setting for that maybe?

The search box as such doesn't do any MySQL queries. There is no sensible explanation for the inclusion of that box to slow the page rendering down.

Posted

I agree. I also thought so.

 

But still, if search is used in column_left, it goes slow. If it is removed, site goes smoothly.

Even if I don´t use and actually submit any search.

 

I have also tried my page on another webhost and it was the same there too...=(

 

Could it be all the pictures that is slowing don´t?

Using "big" pictures that is used for both the thumbnail pics and also for seeing a bigger pic when clicked on a produkt?

 

 

 

 

The search box as such doesn't do any MySQL queries. There is no sensible explanation for the inclusion of that box to slow the page rendering down.

Posted

Could it be all the pictures that is slowing don´t?

Using "big" pictures that is used for both the thumbnail pics and also for seeing a bigger pic when clicked on a produkt?

Absolutely. There are a number of thumbnail contributions for that but I don't know which ones are the best/easiest.

Posted

Done some more research and think I found the possible problem but don´t know how to fix it...

 

* in column_left.php the SEARCH.PHP can be used

* SEARCH.PHP is calling the routine tep_draw_input_field in file HTML_OUTPUT.PHP

* in the routine tep_draw_input_field in HTML_OUTPUT.PHP the <input> command is used to get the search box where to write the text that one want to search, an it is THIS <input> command that is slowing the whole site down

 

So, removed the SEARCH.PHP in COLUMN_LEFT.PHP and added a <input> command to see what happens and ther you go, site goes slow again.

 

With other words, site goes slow when <input> command is being used.

 

Anyone who knows if there is a way of creating the search box without using <input> ?

Posted

With other words, site goes slow when <input> command is being used.

Are you sure that your computer is not infected with malware (keylogger) that springs into action when an input field is displayed and that that is the cause of your computer to slow down. A superficial Google search turned up some results that indicate that keyloggers slow down your computer.

Posted

Sami,

 

Might I make a few suggestions...?

 

Get HitMan Pro 3.5 as it found and fixed malware that my two other programs could not.

Test your site using someone elses computer to see if it behaves the same.

 

Utilizing the search feature "should" not cause any problems just being there. You most likely have another issue.

 

As far as using your large image and letting osC downsize the image for thumbnails is not a good idea.

There are many thumbnail contributions available but be aware that not all will actually reduce the file size, just the presented resolution. Which in fact is no better than what you have happening now. I used an easy to install contribution but it requires me to make two actual images - large and thumbnail. But my pages load quickly. Contribution - Big Images Modification v1.25.

 

Good luck!

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Posted

Problem solved FINALLY!!

 

It was what you thought jhande and what you Jan Zonjee recommended about the picture size.

 

 

Made a new map with thumbnail images that are instead of 400x400, smaller sized = 100x100.

And then changed the code in product_listing and new_products to pick the product pictures from this new map instead.

 

Easy when you finally understand the problem!=)

 

Thanks a lot everyone for your comments and help! Mostly appreciated!!

Have a nice day!

 

// Sami

Archived

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

×
×
  • Create New...