db: function with too many pointers to it cause slow down