Real-time 3D data processing is important in robotics, video games, environmental mapping, medical and many other fields. In this paper we propose a novel optimisation approach for the open source Point Cloud Library (PCL) that is frequently used for processing 3D data. Three aspects of the PCL are discussed: point cloud creation from disparity of colour image pairs, voxel grid downsample filtering to simplify point clouds and passthrough filtering to adjust the size of the point cloud. Additionally, rendering is examined. An optimisation technique based on CPU cycle measurement is proposed and applied in order to optimise those parts of the processing chain where measured performance is worst. The PCL modules thus optimised show on average an improvement in speed of 2.4x for point cloud creation, 91x for voxel grid filtering and 7.8x for the passthrough filter.