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

One TailwindCSS related server rebuild issue #13316

Closed
bep opened this issue Jan 29, 2025 · 1 comment · Fixed by #13317 or #13329
Closed

One TailwindCSS related server rebuild issue #13316

bep opened this issue Jan 29, 2025 · 1 comment · Fixed by #13317 or #13329
Assignees
Labels
Milestone

Comments

@bep
Copy link
Member

bep commented Jan 29, 2025

I can reproduce this easily, so shoul be easy to fix. What happens in this TW4 site is:

  • Editing non TW related things (templates, content) => snappy refreshes.
  • Edit TW stylesheet => relatively slow rebuild (Tailwind)
  • Then editing non TW related things (templates, content) => seems to keep on rebuilding TW, which should not be needed.

I'm not sure what's happening, or where, but this seem to be something new.

@bep bep added the Bug label Jan 29, 2025
@bep bep added this to the v0.143.0 milestone Jan 29, 2025
@bep bep self-assigned this Jan 29, 2025
bep added a commit that referenced this issue Jan 29, 2025
@bep bep closed this as completed in 6c68142 Jan 29, 2025
@bep
Copy link
Member Author

bep commented Jan 30, 2025

Reopen this, my fix for this didn't completely fix it, there still is an annoying issue with Tailwind rebuilds that should not be needed.

@bep bep reopened this Jan 30, 2025
bep added a commit to bep/hugo that referenced this issue Feb 1, 2025
Two issues:

1. Fixe potential edit-loop in server/watch mode (see below)
2. Drain the cache eviction stack before we start calculating the change set. This should allow more fine grained rebuilds for bigger sites and/or in low memory situations.

The fix in 6c68142 wasn't really fixing the complete problem.

In Hugo we have some steps that takes more time than others, one example being CSS building with TailwindCSS.

The symptom here is that sometimes when you:

1. Edit content or templates that does not trigger a CSS rebuild => Snappy rebuild.
2. Edit stylesheet or add a CSS class to template that triggers a CSS rebuild => relatively slow rebuild (expected)
3. Then back to content editing or template edits that should not trigger a CSS rebuild => relatively slow rebuild (not expected)

This commit fixes this by pulling the dynacache GC step up and merge it with the cache buster step.

Fixes gohugoio#13316
bep added a commit to bep/hugo that referenced this issue Feb 1, 2025
Two issues:

1. Fixe potential edit-loop in server/watch mode (see below)
2. Drain the cache eviction stack before we start calculating the change set. This should allow more fine grained rebuilds for bigger sites and/or in low memory situations.

The fix in 6c68142 wasn't really fixing the complete problem.

In Hugo we have some steps that takes more time than others, one example being CSS building with TailwindCSS.

The symptom here is that sometimes when you:

1. Edit content or templates that does not trigger a CSS rebuild => Snappy rebuild.
2. Edit stylesheet or add a CSS class to template that triggers a CSS rebuild => relatively slow rebuild (expected)
3. Then back to content editing or template edits that should not trigger a CSS rebuild => relatively slow rebuild (not expected)

This commit fixes this by pulling the dynacache GC step up and merge it with the cache buster step.

Fixes gohugoio#13316
@bep bep closed this as completed in #13329 Feb 1, 2025
bep added a commit that referenced this issue Feb 1, 2025
Two issues:

1. Fixe potential edit-loop in server/watch mode (see below)
2. Drain the cache eviction stack before we start calculating the change set. This should allow more fine grained rebuilds for bigger sites and/or in low memory situations.

The fix in 6c68142 wasn't really fixing the complete problem.

In Hugo we have some steps that takes more time than others, one example being CSS building with TailwindCSS.

The symptom here is that sometimes when you:

1. Edit content or templates that does not trigger a CSS rebuild => Snappy rebuild.
2. Edit stylesheet or add a CSS class to template that triggers a CSS rebuild => relatively slow rebuild (expected)
3. Then back to content editing or template edits that should not trigger a CSS rebuild => relatively slow rebuild (not expected)

This commit fixes this by pulling the dynacache GC step up and merge it with the cache buster step.

Fixes #13316
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant