You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Means that almost all templates are written at the same time to the disk, which dramatically slows down individual writes. I added a console.time around the write to show this and recorded the output. You can see that some files take a full 15 seconds to write, and the total time for ‘Template Write’ is 15,885ms or nearly 16 seconds with 926 files.
For the sake of testing, I changed just that line to use fs.writeFileSync instead of await writeFile. Here’s the output. The time for ‘Template Write’ dropped to 232ms, with each individual file taking under a millisecond.
Reproduction steps
Create multiple template files.
Run Eleventy.
Expected behavior
Files are written sequentially or with bounded concurrency.
Reproduction URL
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered:
Operating system
Windows 10
Eleventy
3.0.0-alpha.9
Describe the bug
This use of Promises:
eleventy/src/Template.js
Line 751 in 9c3a761
Means that almost all templates are written at the same time to the disk, which dramatically slows down individual writes. I added a
console.time
around the write to show this and recorded the output. You can see that some files take a full 15 seconds to write, and the total time for ‘Template Write’ is 15,885ms or nearly 16 seconds with 926 files.For the sake of testing, I changed just that line to use
fs.writeFileSync
instead ofawait writeFile
. Here’s the output. The time for ‘Template Write’ dropped to 232ms, with each individual file taking under a millisecond.Reproduction steps
Expected behavior
Files are written sequentially or with bounded concurrency.
Reproduction URL
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered: