It depends on how involved the composers are with the filmmakers and how complex the score is. Composers can be creating pieces for the film before they even start shooting (ala The Girl With The Dragon Tattoo) or it could be one of the last things that gets done for the film.