Scientists have released a draft sequence of the cacao genome, in a move bound to give farmers hopes of higher yields, and consumers - of tastier chocolate.
The study, funded mainly by the US chocolate producer Mars, is aimed at ensuring a sustainable cocoa supply.
IT firm IBM and the US Department of Agriculture also took part in the research.
The results have been published on the Cacao Genome Database website.
According to the global head of plant science and research at the confectionery firm, Howard-Yana Shapiro, the sequence is of great importance.
"This opens the door to improving the lives for 6.5 million small farmers directly, but over 40 million individuals who are involved in the cocoa industry, whether they are brokers, or traders, or manufacturers," he told BBC News.
The scientist explained that despite many people being directly or indirectly dependent on cocoa crops to survive, until now there has been little investment in research to improve the cacao tree.
"As plant breeders, we're always looking after the golden traits: pest and disease resistant, drought tolerance, the ability to adapt to climate change, tree architecture, yield quality, etc," said Dr Shapiro.
Three years early
The results have been released three years earlier than planned, in part because of the recent advances in technology and genetics, in particular "the power of the Blue Gene supercomputer", said Ajay Royyuru, senior manager at the IBM Computational Biology Center.
"By assembling the sequence fragments into the complete genome sequence and developing a detailed genetic map, we can help maximize the potential yield and income for cocoa farmers and catalyze future research and endeavours involving the cacao tree."
Although the primary aim of the research is improving the cacao trees, scientists say that the breakthrough could also improve the quality of the chocolate.
"This effort should allow farmers and cocoa producers to grow cocoa that's more consistent in its quality," Harold Schmitz from Mars told BBC News.
"Genetics determine to some extent the flavour that the trees produce. In terms of the actual chocolate, one needs to start with good quality cocoa, but then there is a lot of other attributes that come down to the chocolate manufacturer," he added.