lenp  in on_updatethread "optimized"