New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: concurrent map iteration and map write #6716
Comments
@bep Do you need any additional debug info from me to solve this? It seems to be a really critical fatal error, and it hurts our workflow more and more. |
With the work done in Hugo 0.62, the construct that is failing here should be possible to remove ... I will try to find time to rework this for 0.63. but time is a scarce resource ... |
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML templates without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others:: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.0ms ± 1% 10.5ms ± 1% -19.55% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.1ms ± 1% 10.6ms ± 0% -18.91% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.5ms ± 0% 42.8ms ± 1% -7.96% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.3ms ±12% 47.9ms ± 5% ~ (p=0.200 n=4+4) SiteNew/Deep_content_tree-16 76.5ms ± 1% 70.2ms ± 1% -8.27% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 42.7ms ± 1% 36.8ms ± 1% -13.93% (p=0.029 n=4+4) SiteNew/Page_collections-16 57.4ms ± 0% 52.4ms ± 0% -8.64% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.78% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.00MB ± 0% -44.34% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.1MB ± 2% 14.1MB ± 0% -26.48% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.6MB ± 0% 68.9MB ± 0% -2.42% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.0MB ± 0% 31.2MB ± 0% -15.77% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.5MB ± 0% 10.5MB ± 0% -39.88% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.96% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.17% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 335k ± 1% 269k ± 0% -19.53% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 400k ± 0% 313k ± 0% -21.66% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.05% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.46% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML content files without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others:: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.0ms ± 1% 10.5ms ± 1% -19.55% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.1ms ± 1% 10.6ms ± 0% -18.91% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.5ms ± 0% 42.8ms ± 1% -7.96% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.3ms ±12% 47.9ms ± 5% ~ (p=0.200 n=4+4) SiteNew/Deep_content_tree-16 76.5ms ± 1% 70.2ms ± 1% -8.27% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 42.7ms ± 1% 36.8ms ± 1% -13.93% (p=0.029 n=4+4) SiteNew/Page_collections-16 57.4ms ± 0% 52.4ms ± 0% -8.64% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.78% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.00MB ± 0% -44.34% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.1MB ± 2% 14.1MB ± 0% -26.48% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.6MB ± 0% 68.9MB ± 0% -2.42% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.0MB ± 0% 31.2MB ± 0% -15.77% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.5MB ± 0% 10.5MB ± 0% -39.88% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.96% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.17% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 335k ± 1% 269k ± 0% -19.53% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 400k ± 0% 313k ± 0% -21.66% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.05% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.46% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML content files without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others:: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.0ms ± 1% 10.5ms ± 1% -19.55% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.1ms ± 1% 10.6ms ± 0% -18.91% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.5ms ± 0% 42.8ms ± 1% -7.96% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.3ms ±12% 47.9ms ± 5% ~ (p=0.200 n=4+4) SiteNew/Deep_content_tree-16 76.5ms ± 1% 70.2ms ± 1% -8.27% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 42.7ms ± 1% 36.8ms ± 1% -13.93% (p=0.029 n=4+4) SiteNew/Page_collections-16 57.4ms ± 0% 52.4ms ± 0% -8.64% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.78% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.00MB ± 0% -44.34% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.1MB ± 2% 14.1MB ± 0% -26.48% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.6MB ± 0% 68.9MB ± 0% -2.42% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.0MB ± 0% 31.2MB ± 0% -15.77% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.5MB ± 0% 10.5MB ± 0% -39.88% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.96% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.17% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 335k ± 1% 269k ± 0% -19.53% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 400k ± 0% 313k ± 0% -21.66% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.05% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.46% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML content files without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others:: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.0ms ± 1% 10.5ms ± 1% -19.55% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.1ms ± 1% 10.6ms ± 0% -18.91% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.5ms ± 0% 42.8ms ± 1% -7.96% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.3ms ±12% 47.9ms ± 5% ~ (p=0.200 n=4+4) SiteNew/Deep_content_tree-16 76.5ms ± 1% 70.2ms ± 1% -8.27% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 42.7ms ± 1% 36.8ms ± 1% -13.93% (p=0.029 n=4+4) SiteNew/Page_collections-16 57.4ms ± 0% 52.4ms ± 0% -8.64% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.78% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.00MB ± 0% -44.34% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.1MB ± 2% 14.1MB ± 0% -26.48% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.6MB ± 0% 68.9MB ± 0% -2.42% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.0MB ± 0% 31.2MB ± 0% -15.77% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.5MB ± 0% 10.5MB ± 0% -39.88% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.96% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.17% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 335k ± 1% 269k ± 0% -19.53% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 400k ± 0% 313k ± 0% -21.66% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.05% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.46% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760 Fixes gohugoio#6768 Fixes gohugoio#6778
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML content files without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others:: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.0ms ± 1% 10.5ms ± 1% -19.55% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.1ms ± 1% 10.6ms ± 0% -18.91% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.5ms ± 0% 42.8ms ± 1% -7.96% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.3ms ±12% 47.9ms ± 5% ~ (p=0.200 n=4+4) SiteNew/Deep_content_tree-16 76.5ms ± 1% 70.2ms ± 1% -8.27% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 42.7ms ± 1% 36.8ms ± 1% -13.93% (p=0.029 n=4+4) SiteNew/Page_collections-16 57.4ms ± 0% 52.4ms ± 0% -8.64% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.78% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.00MB ± 0% -44.34% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.1MB ± 2% 14.1MB ± 0% -26.48% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.6MB ± 0% 68.9MB ± 0% -2.42% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.0MB ± 0% 31.2MB ± 0% -15.77% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.5MB ± 0% 10.5MB ± 0% -39.88% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.96% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.17% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 335k ± 1% 269k ± 0% -19.53% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 400k ± 0% 313k ± 0% -21.66% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.05% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.46% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760 Fixes gohugoio#6768 Fixes gohugoio#6778
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML content files without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others:: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.0ms ± 1% 10.5ms ± 1% -19.55% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.1ms ± 1% 10.6ms ± 0% -18.91% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.5ms ± 0% 42.8ms ± 1% -7.96% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.3ms ±12% 47.9ms ± 5% ~ (p=0.200 n=4+4) SiteNew/Deep_content_tree-16 76.5ms ± 1% 70.2ms ± 1% -8.27% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 42.7ms ± 1% 36.8ms ± 1% -13.93% (p=0.029 n=4+4) SiteNew/Page_collections-16 57.4ms ± 0% 52.4ms ± 0% -8.64% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.78% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.00MB ± 0% -44.34% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.1MB ± 2% 14.1MB ± 0% -26.48% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.6MB ± 0% 68.9MB ± 0% -2.42% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.0MB ± 0% 31.2MB ± 0% -15.77% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.5MB ± 0% 10.5MB ± 0% -39.88% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.96% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.17% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 335k ± 1% 269k ± 0% -19.53% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 400k ± 0% 313k ± 0% -21.66% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.05% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.46% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760 Fixes gohugoio#6768 Fixes gohugoio#6778
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML content files without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others:: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.0ms ± 1% 10.5ms ± 1% -19.55% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.1ms ± 1% 10.6ms ± 0% -18.91% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.5ms ± 0% 42.8ms ± 1% -7.96% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.3ms ±12% 47.9ms ± 5% ~ (p=0.200 n=4+4) SiteNew/Deep_content_tree-16 76.5ms ± 1% 70.2ms ± 1% -8.27% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 42.7ms ± 1% 36.8ms ± 1% -13.93% (p=0.029 n=4+4) SiteNew/Page_collections-16 57.4ms ± 0% 52.4ms ± 0% -8.64% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.78% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.00MB ± 0% -44.34% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.1MB ± 2% 14.1MB ± 0% -26.48% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.6MB ± 0% 68.9MB ± 0% -2.42% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.0MB ± 0% 31.2MB ± 0% -15.77% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.5MB ± 0% 10.5MB ± 0% -39.88% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.96% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.17% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 335k ± 1% 269k ± 0% -19.53% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 400k ± 0% 313k ± 0% -21.66% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.05% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.46% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760 Fixes gohugoio#6768 Fixes gohugoio#6778
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML content files without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others:: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.0ms ± 1% 10.5ms ± 1% -19.55% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.1ms ± 1% 10.6ms ± 0% -18.91% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.5ms ± 0% 42.8ms ± 1% -7.96% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.3ms ±12% 47.9ms ± 5% ~ (p=0.200 n=4+4) SiteNew/Deep_content_tree-16 76.5ms ± 1% 70.2ms ± 1% -8.27% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 42.7ms ± 1% 36.8ms ± 1% -13.93% (p=0.029 n=4+4) SiteNew/Page_collections-16 57.4ms ± 0% 52.4ms ± 0% -8.64% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.78% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.00MB ± 0% -44.34% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.1MB ± 2% 14.1MB ± 0% -26.48% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.6MB ± 0% 68.9MB ± 0% -2.42% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.0MB ± 0% 31.2MB ± 0% -15.77% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.5MB ± 0% 10.5MB ± 0% -39.88% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.96% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.17% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 335k ± 1% 269k ± 0% -19.53% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 400k ± 0% 313k ± 0% -21.66% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.05% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.46% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760 Fixes gohugoio#6768 Fixes gohugoio#6778
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML content files without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good, but I have repeated the below with ca. the same result. Compared to master: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.1ms ± 1% 10.5ms ± 1% -19.34% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.0ms ± 0% 10.7ms ± 1% -18.05% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.4ms ± 2% 43.1ms ± 1% -7.15% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.2ms ± 2% 47.8ms ± 1% -8.30% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 77.9ms ± 1% 70.9ms ± 1% -9.01% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 43.0ms ± 0% 37.2ms ± 1% -13.54% (p=0.029 n=4+4) SiteNew/Page_collections-16 58.2ms ± 1% 52.4ms ± 1% -9.95% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.70% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.01MB ± 0% -44.20% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.3MB ± 1% 14.1MB ± 0% -26.91% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.7MB ± 0% 69.0MB ± 0% -2.40% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.1MB ± 0% 31.2MB ± 0% -15.94% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.6MB ± 0% 10.6MB ± 0% -39.92% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.99% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.18% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 336k ± 1% 269k ± 0% -19.90% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 401k ± 0% 313k ± 0% -21.79% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.17% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.55% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760 Fixes gohugoio#6768 Fixes gohugoio#6778
This more or less completes the simplification of the template handling code in Hugo started in v0.62. The main motivation was to fix a long lasting issue about a crash in HTML content files without front matter. But this commit also comes with a big functional improvement. As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates. This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others: ``` layouts ├── _default │ ├── baseof.html │ ├── list.html │ └── single.html └── blog └── baseof.html ``` Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below. These benchmarks looks suspiciously good, but I have repeated the below with ca. the same result. Compared to master: ``` name old time/op new time/op delta SiteNew/Bundle_with_image-16 13.1ms ± 1% 10.5ms ± 1% -19.34% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 13.0ms ± 0% 10.7ms ± 1% -18.05% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 46.4ms ± 2% 43.1ms ± 1% -7.15% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 52.2ms ± 2% 47.8ms ± 1% -8.30% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 77.9ms ± 1% 70.9ms ± 1% -9.01% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 43.0ms ± 0% 37.2ms ± 1% -13.54% (p=0.029 n=4+4) SiteNew/Page_collections-16 58.2ms ± 1% 52.4ms ± 1% -9.95% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.70% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.01MB ± 0% -44.20% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 19.3MB ± 1% 14.1MB ± 0% -26.91% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 70.7MB ± 0% 69.0MB ± 0% -2.40% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 37.1MB ± 0% 31.2MB ± 0% -15.94% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 17.6MB ± 0% 10.6MB ± 0% -39.92% (p=0.029 n=4+4) SiteNew/Page_collections-16 25.9MB ± 0% 21.2MB ± 0% -17.99% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.18% (p=0.029 n=4+4) SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.16% (p=0.029 n=4+4) SiteNew/Tags_and_categories-16 336k ± 1% 269k ± 0% -19.90% (p=0.029 n=4+4) SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.43% (p=0.029 n=4+4) SiteNew/Deep_content_tree-16 401k ± 0% 313k ± 0% -21.79% (p=0.029 n=4+4) SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -42.17% (p=0.029 n=4+4) SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.55% (p=0.029 n=4+4) ``` Fixes gohugoio#6716 Fixes gohugoio#6760 Fixes gohugoio#6768 Fixes gohugoio#6778
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes, it does.
Every now and then while waiting for changes in
server
mode hugo crashes with the following stack trace. It is not 100% reproducible but it happens often enough to be a significant problem working with my site.The text was updated successfully, but these errors were encountered: