hugo/hugolib
Bjørn Erik Pedersen 478a9107a6 Speed up GetTerms
```text
name                               old time/op    new time/op    delta
TaxonomiesGetTerms/pages_100-10      5.25ms  5%    5.13ms  4%     ~     (p=0.486 n=4+4)
TaxonomiesGetTerms/pages_1000-10     30.1ms  1%    26.8ms  1%  -11.13%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_10000-10     1.33s 24%     0.29s  2%  -78.42%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_20000-10     5.50s 12%     0.83s 28%  -84.88%  (p=0.029 n=4+4)

name                               old alloc/op   new alloc/op   delta
TaxonomiesGetTerms/pages_100-10      4.08MB  0%    4.06MB  0%   -0.59%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_1000-10     25.1MB  0%    24.9MB  0%   -0.87%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_10000-10     238MB  2%     233MB  0%   -1.94%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_20000-10     469MB  0%     465MB  0%   -1.00%  (p=0.029 n=4+4)

name                               old allocs/op  new allocs/op  delta
TaxonomiesGetTerms/pages_100-10       49.5k  0%     48.9k  0%   -1.17%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_1000-10       304k  0%      298k  0%   -1.97%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_10000-10     3.02M  7%     2.81M  0%   -7.09%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_20000-10     5.77M  1%     5.59M  0%   -3.19%  (p=0.029 n=4+4)

```

Note that the numbers above represents a full site build, but GetTerms is a big part of the site in question.

Fixes #12610
2024-06-19 15:18:43 +02:00
..
doctree Create pages from _content.gotmpl 2024-05-14 13:12:08 +02:00
filesystems common/hugo: Rename IsMultiHost and IsMultiLingual 2024-03-13 17:34:42 +02:00
pagesfromdata Misc remote HTTP/content adapter enhancements 2024-06-05 12:16:40 +02:00
paths all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
segments Add segments config + --renderSegments flag 2024-03-16 15:53:26 +01:00
testdata Allow whitelisting mediaTypes used in resources.GetRemote 2023-05-20 20:16:45 +02:00
testsite Add support for CODEOWNERS 2022-02-23 22:43:19 +01:00
404_test.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
alias.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
alias_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
breaking_changes_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
cascade_test.go Fix rebuilds on cascade deletes/renames 2024-05-01 17:18:30 +02:00
codeowners.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
collections.go Some godoc adjustments and image struct renames 2022-04-27 23:53:56 +02:00
collections_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
config.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
config_test.go Create pages from _content.gotmpl 2024-05-14 13:12:08 +02:00
configdir_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
content_factory.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
content_factory_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
content_map.go Misc remote HTTP/content adapter enhancements 2024-06-05 12:16:40 +02:00
content_map_page.go Speed up GetTerms 2024-06-19 15:18:43 +02:00
content_map_test.go hugolib: Allow override of sitemap file name 2024-05-23 07:55:53 +02:00
content_render_hooks_test.go tpl: Escape .Title in built-in image and link render hooks 2024-04-22 16:54:24 +02:00
datafiles_test.go Fix assets vs data issue 2024-02-28 19:26:55 +01:00
dates_test.go all: Fix typos and some URLs 2024-02-18 12:16:30 +01:00
disableKinds_test.go Fix disabled languages regression 2024-02-01 19:42:55 +01:00
embedded_shortcodes_test.go tpl/tplimpl: Improve youtube shortcode 2024-04-04 11:08:30 +02:00
embedded_templates_test.go tpl/tplimpl: Remove trailing slash from void elements 2024-04-01 08:07:02 -07:00
fileInfo.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
fileInfo_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
frontmatter_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
gitinfo.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
hugo_modules_test.go Port some integration tests to new test setup 2024-01-28 11:29:23 +01:00
hugo_sites.go Add a HTTP cache for remote resources. 2024-06-04 16:07:39 +02:00
hugo_sites_build.go Misc remote HTTP/content adapter enhancements 2024-06-05 12:16:40 +02:00
hugo_sites_build_errors_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugo_sites_build_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugo_sites_multihost_test.go config: Setups with only one active language can never be multihost 2024-04-25 14:35:49 +02:00
hugo_sites_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugo_smoke_test.go Create pages from _content.gotmpl 2024-05-14 13:12:08 +02:00
hugolib_integration_test.go testing: Rename integration_test.go to PACKAGE_integration_test.go 2024-01-28 11:41:59 +01:00
image_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
integrationtest_builder.go Fix rebuilds when running hugo -w 2024-04-25 14:35:49 +02:00
language_content_dir_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
language_test.go Filter dot files etc. in i18n 2024-02-05 14:54:02 +01:00
menu_test.go Only add root sections to the section pages menu 2024-04-20 17:23:33 +02:00
minify_publisher_test.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
mount_filters_test.go Fix Name for nested resourced fetched in resources.ByName and similar 2024-03-13 18:59:50 +02:00
page.go Create pages from _content.gotmpl 2024-05-14 13:12:08 +02:00
page__common.go resources/page: Pull internal Page methods into its own interface 2024-05-02 10:49:02 +02:00
page__content.go content adapter: Fix issue with content starting out with a shortcode 2024-05-30 11:29:21 +02:00
page__data.go Don't use the same value in .Data.Term.Title as in .Title 2024-02-17 12:34:50 +01:00
page__fragments_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page__menus.go content adapter: Add support for menus in AddPage 2024-05-30 11:29:21 +02:00
page__meta.go Create pages from _content.gotmpl 2024-05-14 13:12:08 +02:00
page__meta_test.go Fix draft for non-default content when content in default language does not exist 2024-02-28 19:26:55 +01:00
page__new.go Fix paths with dots issue with content adapters 2024-05-15 12:39:33 +02:00
page__output.go Fix rebuild with resources.Concat 2024-02-16 13:17:53 +01:00
page__paginator.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page__paths.go all: Fix typos and some URLs 2024-02-18 12:16:30 +01:00
page__per_output.go content adapter: Handle <!--more--> separator in content.value 2024-06-01 12:04:05 +02:00
page__position.go hugolib: Formally deprecate .Page.NextPage .Page.PrevPage 2024-02-03 17:28:52 +01:00
page__ref.go Improve error messages, esp. when the server is running 2022-05-06 19:43:22 +02:00
page__tree.go Fix .Parent when there are overlapping regular pages inbetween 2024-03-16 14:48:04 +01:00
page_kinds.go Move all Kind constants to its own package 2023-07-28 15:14:23 +02:00
page_permalink_test.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
page_test.go hugolib: Fix regression for blank summaries 2024-04-05 17:43:55 +02:00
page_unwrap.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page_unwrap_test.go all: gofmt -w -r 'interface{} -> any' . 2022-03-17 22:03:27 +01:00
pagebundler_test.go Fix resource bundling for overlapping page.md vs page.txt 2024-04-02 14:32:05 +02:00
pagecollections.go Speed up GetPage 2024-02-23 16:29:21 +01:00
pagecollections_test.go content adapter: Fix site.GetPage using the base part of the path 2024-06-02 13:30:52 +02:00
pages_capture.go Create pages from _content.gotmpl 2024-05-14 13:12:08 +02:00
pages_language_merge_test.go resources/page: Deprecate .Sites.First in favor of .Sites.Default 2024-06-01 18:02:19 +02:00
pages_test.go Add a benchmark 2021-05-04 17:59:04 +02:00
paginator_test.go Improve nilpointer error message 2024-02-01 19:53:51 +01:00
params_test.go Handle build vs _build in front matter 2024-02-03 15:07:59 +01:00
permalinker.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00
prune_resources.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
rebuild_test.go Make the cache eviction logic for stale entities more robust 2024-05-04 19:45:43 +02:00
rendershortcodes_test.go Make the cache eviction logic for stale entities more robust 2024-05-04 19:45:43 +02:00
renderstring_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
resource_chain_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
robotstxt_test.go Fix robots.txt using the built-in template regression 2024-02-20 11:17:44 +01:00
rss_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
securitypolicies_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
shortcode.go Create pages from _content.gotmpl 2024-05-14 13:12:08 +02:00
shortcode_page.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
shortcode_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
site.go Add a HTTP cache for remote resources. 2024-06-04 16:07:39 +02:00
site_benchmark_new_test.go Make the cache eviction logic for stale entities more robust 2024-05-04 19:45:43 +02:00
site_new.go Add a HTTP cache for remote resources. 2024-06-04 16:07:39 +02:00
site_output.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
site_output_test.go Fix regression for outputs defined in front matter for term pages 2024-03-19 15:07:48 +01:00
site_render.go Add option to not generate aliases for first page of pagination pages 2024-06-08 15:42:01 +02:00
site_sections.go Create pages from _content.gotmpl 2024-05-14 13:12:08 +02:00
site_sections_test.go Fix .Parent when there are overlapping regular pages inbetween 2024-03-16 14:48:04 +01:00
site_stats_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
site_test.go resources/page: Let GroupByParam return nil instead of error 2024-06-08 18:35:14 +02:00
site_url_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
siteJSONEncode_test.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00
sitemap_test.go tpl/tplimpl: Optionally exclude content from sitemap 2024-04-02 11:21:03 +02:00
taxonomy_test.go Speed up GetTerms 2024-06-19 15:18:43 +02:00
template_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
testhelpers_test.go tpl/tplimpl: Update Google Analytics template and config 2024-03-26 15:40:51 +01:00