Skip to content

Handle missing compiled views during folded expiry checks#176

Open
prateekbhujel wants to merge 1 commit intolivewire:mainfrom
prateekbhujel:prateekbhujel/fix-folded-expiry-missing-compiled-view
Open

Handle missing compiled views during folded expiry checks#176
prateekbhujel wants to merge 1 commit intolivewire:mainfrom
prateekbhujel:prateekbhujel/fix-folded-expiry-missing-compiled-view

Conversation

@prateekbhujel
Copy link
Copy Markdown
Contributor

Fixes #175.

Blaze checks folded front matter after Blade reports a compiled view is fresh. If that compiled file is removed before Blaze reads it, the read can fail instead of letting Blade rebuild the view.

This retries through the compiler once when that compiled file is missing, then checks the fresh compiled output.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Result: Default

Attempt Blade Blaze Improvement
#1 352.15ms 16.45ms 95.3%
#2 351.08ms 16.12ms 95.4%
#3 * 363.05ms 16.50ms 95.5%
#4 355.59ms 16.40ms 95.4%
#5 354.51ms 16.03ms 95.5%
#6 358.51ms 16.51ms 95.4%
#7 349.15ms 16.15ms 95.4%
#8 348.07ms 16.45ms 95.3%
#9 351.67ms 15.97ms 95.5%
#10 352.16ms 15.99ms 95.5%
Snapshot 355.34ms 16.27ms 95.4%
Result 352.15ms (~) 16.15ms (~) 95.4% (~)

Median of 10 attempts (* = outlier, excluded from result), 5000 iterations x 10 rounds, 46.61s total

To run a specific benchmark, comment /benchmark <name> where name is one of: attributes, aware, class, default, forwarding, merge, named-slots, no-attributes, slot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TOCTOU race in BlazeManager::isFoldedExpired() → ErrorException when compiled view is removed between isExpired() and file_get_contents()

1 participant