threaded optimization what does it do