
James S. answered 09/17/19
Full-stack Developer
You mentioned you're using Angular 1.x on the front end and using Nodejs and PostgreSQL on the back-end.
Do you expect your application to scale? If so, I'd avoid using memory. Also, are you running your application behind a load balancer? That can get tricky if using in-memory storage. Also within a docker container if you go that route.
My recommendation would be to pull the data from the back-end as you need it. I find oData calls to be quite speedy and flexible for pagination type calls.
I'm assuming you are using Express or Koa as your middleware and creating restful endpoints? If you're serializing your data using JSON then the user experience should not diminish and you should still be within your 2 second response time.
I'd also recommend moving off of Angular 1.x.