mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 18:11:48 +00:00
Previously, it took ~6 seconds for a single edit/test/debug feedback loop in the `llmapi` module. After this change, it's now 1-2s. The reason the feedback loop was slow was that we depended on the `//cmd/frontend/internal/modelconfig` target, which transitively brings in `graphqlbackend` and all the migration code, which adds huge overhead to Go link times. It was relatively easy to untangle this dependency so I went ahead and removed it to boost my local feedback loop. <!-- PR description tips: https://www.notion.so/sourcegraph/Write-a-good-pull-request-description-610a7fd3e613496eb76f450db5a49b6e --> ## Test plan Green CI. To measure the timing, I ran the tests, made a tiny change and ran the tests against to measure the total time to build+test. ``` # Before ❯ time go test -timeout 30s github.com/sourcegraph/sourcegraph/cmd/frontend/internal/llmapi ok github.com/sourcegraph/sourcegraph/cmd/frontend/internal/llmapi 2.394s go test -timeout 30s 4.26s user 4.73s system 166% cpu 5.393 total # After ❯ time go test -timeout 30s github.com/sourcegraph/sourcegraph/cmd/frontend/internal/llmapi ok github.com/sourcegraph/sourcegraph/cmd/frontend/internal/llmapi 0.862s go test -timeout 30s 1.20s user 1.21s system 135% cpu 1.774 total ``` <!-- REQUIRED; info at https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles --> ## Changelog <!-- OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c --> |
||
|---|---|---|
| .. | ||
| auth | ||
| dotcomproductsubscriptiontest | ||
| enterprise | ||
| envvar | ||
| graphqlbackend | ||
| hubspot | ||
| internal | ||
| shared | ||
| BUILD.bazel | ||
| image_test.yaml | ||
| main.go | ||
| README.md | ||
frontend
The frontend serves our web application and hosts our GraphQL API.
Typically there are multiple replicas running in production to scale with load.
Application data is stored in our PostgreSQL database.
Session data is stored in the Redis store, and non-persistent data is stored in the Redis cache.