Improve work cost computation

issue3189
review1008002