Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the redirect slow for anyone else? #42

Open
Madd0g opened this issue Mar 26, 2023 · 6 comments
Open

Is the redirect slow for anyone else? #42

Madd0g opened this issue Mar 26, 2023 · 6 comments

Comments

@Madd0g
Copy link

Madd0g commented Mar 26, 2023

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

@jeansaad
Copy link
Owner

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

@Madd0g
Copy link
Author

Madd0g commented Nov 10, 2023

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

@jeansaad
Copy link
Owner

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

@Madd0g
Copy link
Author

Madd0g commented Nov 10, 2023

less than 20

@jeansaad
Copy link
Owner

It seems possible that the issue might be specifically with the service you are running: simonw/datasette#316 (comment)

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.

@Madd0g
Copy link
Author

Madd0g commented Nov 11, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants