improve handling of draw_sample()

5 jobs for issue_236 in 2 minutes and 37 seconds (queued for 1 second)