Facing flickering in virtual scrolling and other issues too, anyone knows?

I’m trying to implement virtual scrolling in a generalized way so that all my pages with table can access it. I know I’m calling the scroll event repeatedly for scrolling even a small pixel which I shouldn’t be and I’m using a map as buffer/cache and my advisor insisted on using a circular double linked list so I have used that just to store and update the rows. The table keeps flickering when I reach the end as it’s trying to fetch more rows I guess which is causing error. :(. someone please help. I’ll share my code with you

implementing virtual scrolling but facing data fetching and scroll height issues