mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
Misc resource fixes/improvements
* Add --pprof flag to server to enable profile debugging. * Don't cache the resource content, it seem to eat memory on bigger sites. * Keep --printMemoryUsag running in server Fixes #11974
This commit is contained in:
@@ -163,15 +163,15 @@ func (r *Spec) NewResource(rd ResourceSourceDescriptor) (resource.Resource, erro
|
||||
}
|
||||
|
||||
gr := &genericResource{
|
||||
Staler: &AtomicStaler{},
|
||||
h: &resourceHash{},
|
||||
paths: rp,
|
||||
spec: r,
|
||||
sd: rd,
|
||||
params: make(map[string]any),
|
||||
name: rd.Name,
|
||||
title: rd.Name,
|
||||
resourceContent: &resourceContent{},
|
||||
Staler: &AtomicStaler{},
|
||||
h: &resourceHash{},
|
||||
publishInit: &sync.Once{},
|
||||
paths: rp,
|
||||
spec: r,
|
||||
sd: rd,
|
||||
params: make(map[string]any),
|
||||
name: rd.Name,
|
||||
title: rd.Name,
|
||||
}
|
||||
|
||||
if rd.MediaType.MainType == "image" {
|
||||
|
Reference in New Issue
Block a user