I'm trying to figure out if there's an inefficiency in my app's process. Right now, my app downloads zip files from a server, unzips them, and provides the user with an array containing one file from each of those zip files. I'm wondering if it would be more efficient for me to send the entire array of zip files to the client and then let JavaScript handle the unzipping. Just to clarify, the files in the zips are all small text files.
1 Answer
If your server's already sending gzipped content, using zip files might not cut down on data transfer. If the unzipping process is slowing down your server, it could make sense to shift that workload to the client. But just a heads-up, moving the unzipping to the client might add latency.
*These are just my thoughts; definitely recommend measuring the performance to see what's really happening.*
I completely agree with you! It's crucial to have concrete measurements before deciding on a change. And also, if it works fine right now and isn't causing problems, maybe it's best to leave it as is and focus on other priorities!