Closed
Description
Preconditions
- Magento 2.1.1
- PHP 5.6
- Apache
Steps to reproduce
- In admin go to Store > Configuration > General > Allowed Countries change this list to some limited set. (We selected only United States for example.)
- Clear all Magento caches.
- Go to the Checkout page
Expected result
- Template/JSON code embedded in page should not have region_id definitions for all the disabled regions.
Actual result
- There is still 320KB of region definitions loaded on every /checkout request for all the regions we have disabled. This is a major killer of performance on the checkout page as it has to download this data every time, wont be cached, and all the non-us region data in this case will never be used as we configured the site to only allow the us region.