This avoids running configuration tests multiple times. I discovered this
using the collect binaries executor (D84045) since the output directory
contained two folders for each locale check since isSupported() is called
multiple times:
Before:
check_locale_cs_CZ.ISO8859-22l9izs95.cpp.dir
check_locale_cs_CZ.ISO8859-2kai5chqg.cpp.dir
check_locale_en_US.UTF-8av355dei.cpp.dir
check_locale_en_US.UTF-8bh_vxteu.cpp.dir
check_locale_fr_CA.ISO8859-16iqfdts7.cpp.dir
check_locale_fr_CA.ISO8859-1jytt_wqw.cpp.dir
check_locale_fr_FR.UTF-8jxintigp.cpp.dir
check_locale_fr_FR.UTF-8lp3_p554.cpp.dir
check_locale_ru_RU.UTF-84wd2uc3q.cpp.dir
check_locale_ru_RU.UTF-8pjuyogc7.cpp.dir
check_locale_zh_CN.UTF-8eekw_qhg.cpp.dir
check_locale_zh_CN.UTF-8zfw71vzu.cpp.dir
After:
check_locale_cs_CZ.ISO8859-2ldoy7luu.cpp.dir
check_locale_en_US.UTF-824v0soux.cpp.dir
check_locale_fr_CA.ISO8859-18nhriebb.cpp.dir
check_locale_fr_FR.UTF-82nn3grpg.cpp.dir
check_locale_ru_RU.UTF-8k4aduyv1.cpp.dir
check_locale_zh_CN.UTF-8pr4ax8yr.cpp.dir
This noticeably speeds up running a single test.
Adding some debugging printfs to _executeScriptInternal()
show that with this change it is only called 36 times
(with D88878 and D88884 applied) instead of 120 times.
Even with caching at a lower level, this reduces the lit startup time
(using a single test and --no-execute) from 5.7seconds to 2.3 seconds.