I'm building an API and I would like to know what is the best way to paginate in symfony (v4) and doctrine ORM.
I've used some bundles such as knp paginator and Pagerfanta,but I'm asking because I'm concerned with performance when we have much data in the DB. would't be better to use Doctrine's Paginator and implements a pagination by myself ?
thanks.