←back to thread

145 points todsacerdoti | 1 comments | | HN request time: 0.258s | source
Show context
nvahalik ◴[] No.45040957[source]
When doing web development I will occasionally connect my local code base to a remote SQL server via SSH.

This adds enough latency to be noticeable and I’ve found pages that were “OK” in prod that were unbearable in my local environment. Most of the time it was N+1 queries. Sometimes it was a cache that wasn’t working as intended. Sometimes it simply was a feature that “looked cool” but offered no value.

I’m not sure if there is a proxy that would do this locally but I’ve found it invaluable.

replies(5): >>45041182 #>>45042663 #>>45042957 #>>45047086 #>>45048528 #
nawgz ◴[] No.45042957[source]
I’m not sure if you’re saying the latency was introduced in client <-> server hops or server <-> db hops, but chrome dev tools (I’m sure all browsers too) can simulate different network conditions with a few clicks! Useful for something similar to what you’ve said, but in the end I think you meant server <-> db latency is what you want to inject
replies(1): >>45045787 #
1. MetaWhirledPeas ◴[] No.45045787[source]
This was the first thing I thought of. Dev Tools in any browser have a boatload of great stuff like this.