refactor: transform processor xsls only once #5397

Merged
tobiasd merged 4 commits from feat/processors into master 2025-10-13 11:24:30 +00:00
Member

About

Summary

Before we iterated over xhtml files by directory, and rss/ics ones by processor (xsl stylesheet).

This worked, but meant we had to pass the processor filepath to the processing functions, which meant we were reprocessing the xsl several times, probably hundred for some xsl's, like the default one for a site.

We now instead iterate by processor, pre parsing it before passing it to the processing code.

This gets us a significant speed increase (~30%), and makes the code a little cleaner.

Benchmarks

Before

Benchmark 1: uv run build --full
  Time (mean ± σ):     269.798 s ± 12.501 s    [User: 1566.724 s, System: 75.804 s]
  Range (min … max):   262.183 s … 284.226 s    3 runs

After

Benchmark 1: uv run build --full
  Time (mean ± σ):     206.330 s ±  5.088 s    [User: 498.556 s, System: 47.233 s]
  Range (min … max):   202.760 s … 212.155 s    3 runs
# About ## Summary Before we iterated over xhtml files by directory, and rss/ics ones by processor (xsl stylesheet). This worked, but meant we had to pass the processor filepath to the processing functions, which meant we were reprocessing the xsl several times, probably hundred for some xsl's, like the default one for a site. We now instead iterate by processor, pre parsing it before passing it to the processing code. This gets us a significant speed increase (~30%), and makes the code a little cleaner. # Benchmarks ## Before ``` Benchmark 1: uv run build --full Time (mean ± σ): 269.798 s ± 12.501 s [User: 1566.724 s, System: 75.804 s] Range (min … max): 262.183 s … 284.226 s 3 runs ``` ## After ``` Benchmark 1: uv run build --full Time (mean ± σ): 206.330 s ± 5.088 s [User: 498.556 s, System: 47.233 s] Range (min … max): 202.760 s … 212.155 s 3 runs ```
delliott changed title from feat: transform processor xsls only once to refactor: transform processor xsls only once 2025-10-11 21:48:53 +00:00
delliott added 1 commit 2025-10-11 21:52:37 +00:00
refactor: inline unneeded function
All checks were successful
continuous-integration/drone/pr Build is passing
04b20667a9
streamline processor choosing logic
delliott changed title from refactor: transform processor xsls only once to WIP: refactor: transform processor xsls only once 2025-10-11 21:52:49 +00:00
delliott requested review from tobiasd 2025-10-12 10:39:37 +00:00
delliott changed title from WIP: refactor: transform processor xsls only once to refactor: transform processor xsls only once 2025-10-12 10:39:45 +00:00
delliott added the
build
xsl
labels 2025-10-12 16:00:40 +00:00
tobiasd added 1 commit 2025-10-13 11:23:38 +00:00
Merge branch 'master' into feat/processors
All checks were successful
continuous-integration/drone/pr Build is passing
d2abd41454
tobiasd merged commit 5551375ac8 into master 2025-10-13 11:24:30 +00:00
tobiasd deleted branch feat/processors 2025-10-24 15:49:50 +00:00
Sign in to join this conversation.
No description provided.