We consider the setup employed in a recent experiment (Ramanathan et al 2011 Phys. Rev. Lett. 106 130401) devoted to the study of the instability of the superfluid flow of a toroidal Bose-Einstein condensate in presence of a repulsive optical barrier. Using the Gross-Pitaevskii mean-field equation, we observe, consistently with what we found in Piazza et al (2009 Phys. Rev. A 80 021601), that the superflow with one unit of angular momentum becomes unstable at a critical strength of the barrier, and decays through the mechanism of phase slippage performed by pairs of vortex-antivortex lines annihilating. While this picture qualitatively agrees with the experimental findings, the measured critical barrier height is not very well reproduced by the Gross-Pitaevskii equation, indicating that thermal fluctuations can play an important role (Mathey et al 2012 arXiv:1207.0501). As an alternative explanation of the discrepancy, we consider the effect of the finite resolution of the imaging system. At the critical point, the superfluid velocity in the vicinity of the obstacle is always of the order of the sound speed in that region, $v_{rm barr}=c_{rm l}$. In particular, in the hydrodynamic regime (not reached in the above experiment), the critical point is determined by applying the Landau criterion inside the barrier region. On the other hand, the Feynman critical velocity $v_{rm f}$ is much lower than the observed critical velocity. We argue that this is a general feature of the Gross-Pitaevskii equation, where we have $v_{rm f}=epsilon c_{rm l}$ with $epsilon$ being a small parameter of the model. Given these observations, the question still remains open about the nature of the superfluid instability.