Skip to content
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

Speed up GetTerms #12611

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Speed up GetTerms #12611

merged 1 commit into from
Jun 19, 2024

Commits on Jun 19, 2024

  1. 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 gohugoio#12610
    bep committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    4ecdf56 View commit details
    Browse the repository at this point in the history