refactor: transform processor xsls only once #5397
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/processors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
After
feat: transform processor xsls only onceto refactor: transform processor xsls only oncerefactor: transform processor xsls only onceto WIP: refactor: transform processor xsls only onceWIP: refactor: transform processor xsls only onceto refactor: transform processor xsls only once