The code that creates the contents of drop-down menus in an oscommerce shop is very inefficient as relating to mySQL queries. It queries the database for every category and subcategory. If you have a lot of categories it will make that page load slow. This version of the function will do one big, slow query but then does the rest in PHP which tends to be faster. In tests, this change caused the code to be about three times faster than the default code.