The Degasperis--Procesi (DP) equation is split into a system of a hyperbolic equation and an elliptic equation. For the hyperbolic equation, we use an optimized finite difference weighted essentially non-oscillatory (OWENO) scheme. New smoothness measurement is presented to approximate the typical shockpeakon structure in the solution to the DP equation, which evidently reduces the dissipation arising from discontinuities simultaneously removing nonphysical oscillations. For the elliptic equation, the Fourier pseudospectral method (FPM) is employed to discretize the high order derivative. Due to the combination of the WENO reconstruction and FPM, the splitting method shows an excellent performance in capturing the formation and propagation of shockpeakon solutions. The numerical simulations for different solutions of the DP equation are conducted to illustrate the high accuracy and capability of the method.