Skip to content

Commit 41c66da

Browse files
committed
Improve content map, memory cache and dependency resolution
TODO(bep) improve commit message. Hugo has always been a active user of in-memory caches, but before this commit we did nothing to control the memory usage. One failing example would be loading lots of big JSON data files and unmarshal them via `transform.Unmarshal`. This commit consolidates all these caches into one single LRU cache with an eviction strategy that also considers used vs. available memory. Hugo will try to limit its memory usage to 1/4 or total system memory, but this can be controlled with the `HUGO_MEMORYLIMIT` environment variable (a float value representing Gigabytes). A natural next step after this would be to use this cache for `.Content`. Fixes gohugoio#8307 Fixes gohugoio#8498 Fixes gohugoio#8927 Fixes gohugoio#9192 Fixes gohugoio#9189 Fixes gohugoio#7425 Fixes gohugoio#7437 Fixes gohugoio#7436 Fixes gohugoio#7882 Updates gohugoio#7544 Fixes gohugoio#9224
1 parent 5e0947c commit 41c66da

File tree

145 files changed

+6816
-5173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+6816
-5173
lines changed

bench.sh

-37
This file was deleted.

benchSite.sh

-12
This file was deleted.

benchbep.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
gobench -package=./hugolib -bench="BenchmarkSiteNew/Deep_content_tree"
1+
gobench --package ./hugolib --bench "BenchmarkSiteNew/Regular_Deep" -base v0.89.4

bepdock.sh

-1
This file was deleted.

0 commit comments

Comments
 (0)