chalet icon indicating copy to clipboard operation
chalet copied to clipboard

Is the redirect slow for anyone else?

Open Madd0g opened this issue 2 years ago • 6 comments

I use chalet as a server catalog. I have fixed ports set up for most services. I hit localhost:2000/server-name to get redirected to the port.

It takes 3-4 seconds to redirect sometimes, I'm wondering why it should take any time at all, what happens other than the redirect? Is there anything to configure to make it redirect without checks?

Thanks

Madd0g avatar Mar 26 '23 22:03 Madd0g

Would you be able to post an example server configuration that you’re calling?

jeansaad avatar Nov 10 '23 01:11 jeansaad

Sure, one example that has a front-end is datasette.

chromehistorydb.json

{
  "cwd": "<my code folder, unrelated to datasette>",
  "cmd": "datasette ~/Library/Application\\ Support/Google/Chrome/Default/History --nolock -p 7826",
  "env": {
    "PATH": "<lots of PATH>",
    "PORT": 7826
  }
}

Can actually see the 5 second delay in the logs:

18:35:07 - Resolve chromehistorydb 18:35:07 - chromehistorydb has started 18:35:43 - Resolve chromehistorydb 18:35:48 - Redirect - chromehistorydb → http://localhost:7826 18:36:09 - Resolve chromehistorydb 18:36:09 - chromehistorydb child process has exited 18:36:09 - chromehistorydb has stopped

Madd0g avatar Nov 10 '23 02:11 Madd0g

Out of curiosity, how many server configurations do you have?

jeansaad avatar Nov 10 '23 04:11 jeansaad

less than 20

Madd0g avatar Nov 10 '23 06:11 Madd0g

It seems possible that the issue might be specifically with the service you are running: https://github.com/simonw/datasette/issues/316#issuecomment-398101670

I tried executing the same thing on a brand new Chrome History file and it loaded up instantaneously.

Let me know if you can somehow create a backup of your history file and test with a new one from scratch to see what the timings are.

jeansaad avatar Nov 10 '23 18:11 jeansaad

I just tried with another service that has a fixed port + frontend The first time it took 5 seconds (in the logs, there's the same 5 second gap between resolve and redirect). Then subsequent calls did not have this delay.

With the chromehistory service - it takes 5 seconds each time. Opening the address directly does not have any delay, it's blazing fast (my history file isn't even 100MB).

Madd0g avatar Nov 11 '23 00:11 Madd0g