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

hugolib: Support regular pages in .Site.GetPage #3524

Merged
merged 4 commits into from
May 26, 2017
Merged

Conversation

bep
Copy link
Member

@bep bep commented May 25, 2017

Fixes #2844

@bep bep force-pushed the getpage-page branch 2 times, most recently from e313ee9 to 3d554c8 Compare May 25, 2017 15:51
Looks to be slightly slower with the low number of section pages, but the 1000 regular pages seem to add value.

```
benchmark                     old ns/op     new ns/op     delta
BenchmarkGetPage-4            97.7          145           +48.41%
BenchmarkGetPageRegular-4     7933          161           -97.97%

benchmark                     old allocs     new allocs     delta
BenchmarkGetPage-4            0              0              +0.00%
BenchmarkGetPageRegular-4     0              0              +0.00%

benchmark                     old bytes     new bytes     delta
BenchmarkGetPage-4            0             0             +0.00%
BenchmarkGetPageRegular-4     0             0             +0.00%
```
This commit also makes that function 80x faster.

Fixes gohugoio#2507
@bep bep changed the title WIP: hugolib: Support regular pages in .Site.GetPage hugolib: Support regular pages in .Site.GetPage May 26, 2017
@bep bep merged commit 612f6e3 into gohugoio:master May 26, 2017
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve .Site.GetPage so it can get a specific regular content page
1 participant