optimize categories and subcategories dropdowns for better performance