  Pulsar surveys with modern radio telescopes are becoming increasingly
computationally demanding. This is particularly true for wide field-of-view
pulsar surveys with radio interferometers, and those conducted in real or
quasi-real time. These demands result in data analysis bottlenecks that can
limit the parameter space covered by the surveys and diminish their scientific
return. In this paper, we address the computational challenge of `candidate
folding' in pulsar searching, presenting a novel, efficient approach designed
to optimise the simultaneous folding of large numbers of pulsar candidates. We
provide a complete folding pipeline appropriate for large-scale pulsar surveys
including radio frequency interference (RFI) mitigation, dedispersion, folding
and parameter optimization. By leveraging the Fast Discrete Dispersion Measure
Transform (FDMT) algorithm proposed by Zackay et al. (2017), we have developed
an optimized, and cache-friendly implementation that we term the pruned FDMT
(pFDMT). The pFDMT approach efficiently reuses intermediate processing results
and prunes the unused computation paths, resulting in a significant reduction
in arithmetic operations. In addition, we propose a novel folding algorithm
based on the Tikhonov-regularised least squares method (TLSM) that can improve
the time resolution of the pulsar profile. We present the performance of its
real-world application as an integral part of two major pulsar search projects
conducted with the MeerKAT telescope: the MPIfR-MeerKAT Galactic Plane Survey
(MMGPS) and the Transients and Pulsars with MeerKAT (TRAPUM) project. In our
processing, for approximately 500 candidates, the theoretical number of
dedispersion operations can be reduced by a factor of around 50 when compared
to brute-force dedispersion, which scales with the number of candidates.
