optimize detail-load-function