The recent upgrade of the LHCb experiment pushes data processing rates up to 40 Tbit/s. Out of the whole reconstruction sequence, one of the most time consuming algorithms is the calorimeter data reconstruction. It aims at performing a clustering of the readout cells from the detector that belong to the same particle in order to measure its energy and position. This article presents a new algorithm for the calorimeter data reconstruction that makes use of graph data structures to optimise the clustering process, that will be denoted Graph Clustering. It outperforms the previously used method by 65.4 % in terms of computational time on average, with an equivalent efficiency and resolution. The implementation of the Graph Clustering method is detailed in this article, together with its performance results inside the LHCb framework using simulation data.