I’m trying to come up with a strategic way to collect large amounts of usermeta data (and output to the screen) while keeping database queries low. Some pages, like the home page, single pages, and category pages, load up in less than half a second with 40-60 queries. Other pages that contain large amounts of usermeta load up in 5-6 seconds with 200-220 queries.
Is there a “best practice” way to do somehow pull all userdata before the website loads (or the first time a website loads) and then tap into that information (IE, a multidimensional array based on user ID) for all other user-based queries on the site? Would the information save on visit (cached on browser), or would it be necessary to use the transient api?
Read more here: Minimize database queries to user tables?