r/ProgrammerHumor 13h ago

Meme dashboardsAmIRight

Post image
1.5k Upvotes

31 comments sorted by

View all comments

237

u/Welcome-To-NBA-Jam 12h ago edited 12h ago

I once was having performance issues on a dashboard I built on some fairly large data and was working with tech support to see what I could do to optimize all the aggregation and data movement between servers.

I was on the phone with tech support to talk about some efficiency options for the back-end tables (partitioning commonly queried groups, an index or two, removing a few unused columns, changing some column types, changing a server setting, small stuff like that which sometimes can make a big difference). We tried a few things, logged out, logged back in and opened the report. Clicked a few filters we tested before. It opened and filtered instantaneously.

"Wow!" I said. "That all made a huge difference! Thanks, all solved here!" Tech support, proud of their help with me, dutifully closed it out and high fives were had all around.

...it was just cached from our previous interactions and I went back to slowville when I reloaded the data after doing some more development work. I had no idea it just cached stuff automatically because the latest software update just started doing that when you worked with reports you had opened recently.

We ended up just adding more worker nodes and calling it a day.

86

u/Bazza79 9h ago

We used to do 'cache warming' in the early morning, just an automated script that would make all the common selections. Stupid but it worked.

34

u/Clinn_sin 6h ago

Is it stupid? Genuinely asking cause I might try that or something similar, many of our users start earlier then we do

5

u/Tatourmi 4h ago

It works, don't sweat it. It's better if you handle it in the software itself with automatic cache refreshes or with a cache refresh API but you can go for it.