optimizing XSetting retrieval