More optimization on the thread model

See title