The SetLocaleSupport class has a static initializer block which invokes DateFormat.getAvailableLocales() and NumberFormat.getAvailableLocales(). These operations crawl through all the Jar files on the classpath, and can take several seconds. Anything to make this run faster would be helpful. Alternatively, maybe we could substitute our own list of Locales so that it wouldn't need search the classpath, when performance is an issue.
Maybe some kind of notion of a pluggable DateLocaleFactory and NumberLocaleFactory (insert better names). Seems doable.
Java6 introduced the java.util.spi.LocaleServiceProvider mechanism as a pluggable mechanism for supporting additional Locales which requires searching the classpath for LocaleServiceProvider implementations when supporting getAvailableLocales(). Prior to 1.6 there was no extension mechanism and getAvailableLocales() only returned the pre-defined Locales supported by the JVM. The matching algorithm described by LocaleServiceProvider is the same as that defined in the JSTL specification 9.3.2 LocaleLookup. We might be able to resolve this issue by switching to the JVM's implementation.