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

Reduce getConfig API calls by using parent route values #4768

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rbren
Copy link
Collaborator

@rbren rbren commented Nov 5, 2024

This PR optimizes the config loading by:

  1. Removing duplicate getConfig() calls in child routes
  2. Using the config values already stored in window globals from the parent route
  3. Adding proper TypeScript type declarations for the global variables

This change will reduce the number of API calls made to get the config, improving performance while maintaining the same functionality.


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:48de691-nikolaik   --name openhands-app-48de691   docker.all-hands.dev/all-hands-ai/openhands:48de691

@rbren
Copy link
Collaborator Author

rbren commented Nov 5, 2024

I think this is the wrong fix

@rbren rbren marked this pull request as draft November 5, 2024 23:29
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

Successfully merging this pull request may close these issues.

3 participants