Simulate production speed of client/server

Hi!

How can I simulate the speed of an app that’s deployed on Heroku? I have an issue where in production there’s a lag that occurs for a ReactiveVar that gets toggled and is supposed to hide/display divs until subscriptions have finished loading.

Basically…user clicks into a view and the form should be hidden until a subscription has finished loading. Instead, the form can be seen for about a couple of seconds - and then it gets hidden - only to be displayed again upon things being finished loading. So this is kinda a “flicker” affect.

My issue is that I’m unable to reproduce this on localhost.

In Chrom DevTools, I created a throttling Profile and set the download/upload speeds to as low as 10kbps. But even then I can’t seem to reproduce the lag that’s on prod. Any ideas?

Thanks!

To conditionally render a particular content depending on your subscription you could simply check in render() (or in your function component) whether the data you subscribe appears on props. Then you don’t need the ReactiveVar thingy either.

1 Like