The amount of data is too large and you need to create a page-turning function
If you need paging, you should be able to implement it using filters https://docs.dhtmlx.com/gantt/desktop__filtering.html
When you implement paging, you have the current page number and number of tasks per page. And your filtering function should check the number of task and display task which number is between (currentPage*tasksPerPage)
and (currentPage*tasksPerPage + tasksPerPage)