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

Merge build paths and build state #221

Closed
arctic-hen7 opened this issue Nov 4, 2022 · 1 comment · Fixed by #238
Closed

Merge build paths and build state #221

arctic-hen7 opened this issue Nov 4, 2022 · 1 comment · Fixed by #238
Labels
author-willing-to-impl The author of this issue is willing to try to implement the solution themselves. C-enhancement Category: enhancement tribble-reported This issue was reported through Tribble.
Milestone

Comments

@arctic-hen7
Copy link
Member

This issue is requesting an enhancement to Perseus. Details of the scope will be available in issue labels.
The user described the problem related to this request as follows:

Currently, the decoupling of the build paths and build state strategies is frankly infuriating. Take the example of a simple blog with a page for each tag: right now, the best way to do this would be to read through all the posts and collect a list of tags, and then read through them all again in build state to figure out which ones have each given tag. We end up with many times more reads than are actually necessary, slowing down app build. The time lag isn't my concern though, since that's negligible in most cases (esp. given the network caching system), it's the code overhead of having to manage this --- just writing the code feels inefficient.

The user described the issue as follows:

I want to merge the build paths and build state systems so that there is one single function for build-time work that returns a map of path to state. In apps using i18n, we could have a function that just generalizes this over locales as well if no locale-specific work needs to be done, but the final return value would be a HashMap<(<path>, <locale>), <state>>. This will improve build times and dramatically reduce code complexity, while also making Perseus just generally easier to use. My only concern is parallelization, which should be encouraged heavily in certain use-cases (currently handled automatically by Perseus, which builds everything in as parallelized a manner as it can).

  • The author is willing to attempt an implementation: true
Tribble internal data

dHJpYmJsZS1yZXBvcnRlZCxDLWVuaGFuY2VtZW50LGF1dGhvci13aWxsaW5nLXRvLWltcGw=

@github-actions github-actions bot added author-willing-to-impl The author of this issue is willing to try to implement the solution themselves. C-enhancement Category: enhancement tribble-reported This issue was reported through Tribble. labels Nov 4, 2022
@arctic-hen7 arctic-hen7 added this to the v0.4.0 milestone Nov 11, 2022
@arctic-hen7
Copy link
Member Author

Note that #238, which solves this, takes the approach of shared state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author-willing-to-impl The author of this issue is willing to try to implement the solution themselves. C-enhancement Category: enhancement tribble-reported This issue was reported through Tribble.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant