tangled
alpha
login
or
join now
whitequark.org
/
git-pages
10
fork
atom
[mirror] Scalable static site server for Git forges (like GitHub Pages)
10
fork
atom
overview
issues
pulls
pipelines
Fetch manifests in parallel when handling GET requests.
miyuko
4 months ago
c39e57a8
3863f0f1
+8
-2
1 changed file
expand all
collapse all
unified
split
src
pages.go
+8
-2
src/pages.go
···
87
87
return err
88
88
}
89
89
90
90
+
indexManifestCh := make(chan *Manifest, 1)
91
91
+
go func() {
92
92
+
manifest, _ := backend.GetManifest(r.Context(), makeWebRoot(host, ".index"),
93
93
+
GetManifestOptions{BypassCache: bypassCache})
94
94
+
indexManifestCh <- manifest
95
95
+
}()
96
96
+
90
97
sitePath = strings.TrimPrefix(r.URL.Path, "/")
91
98
if projectName, projectPath, found := strings.Cut(sitePath, "/"); found {
92
99
projectManifest, err := backend.GetManifest(r.Context(), makeWebRoot(host, projectName),
···
96
103
}
97
104
}
98
105
if manifest == nil {
99
99
-
manifest, err = backend.GetManifest(r.Context(), makeWebRoot(host, ".index"),
100
100
-
GetManifestOptions{BypassCache: bypassCache})
106
106
+
manifest = <-indexManifestCh
101
107
if manifest == nil {
102
108
if found, fallbackErr := HandleWildcardFallback(w, r); found {
103
109
return fallbackErr