Comments (6)
After the fix (#8806) is applied, the build time is reduced to 3.5s
. Let's see if there is side-effect made by the fix for a few days. If nothing happend, I'll close this PR :)
from yari.
Please note that individual workflow runs are not necessarily comparable, as workflow runners use a variety of CPUs.
from yari.
Please note that individual workflow runs are not necessarily comparable, as workflow runners use a variety of CPUs.
Sorry about ignoring that, I just made a local test, and found that:
run
node node_modules/@mdn/yari/build/cli.js files/zh-tw/learn/common_questions/web_mechanics/what_is_a_web_server/index.md
use @mdn/[email protected]
:
13.639s
is used to gather translations.
use @mdn/[email protected]
:
1.831s
is used to gather translations.
Test platform:
OS: Linux debian 6.1.0-3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.8-1 (2023-01-29) x86_64 GNU/Linux
Node.js: v18.13.0
Yarn: 1.22.19 (Debian package: [email protected]+~cs24.27.18-2)
CPU: 13th Gen Intel(R) Core(TM) i5-13600K
With 1TB SSD and 32GB memory
from yari.
I compared @mdn/[email protected]
and @mdn/[email protected]
and indeed the build performance has degraded significantly:
- 1.36.4: 19.0 seconds
- 2.0.0: 49.0 seconds
from yari.
On bf23810, I ran yarn build files/zh-tw/learn/common_questions/web_mechanics/what_is_a_web_server/index.md
and the command completed in ~19 seconds:
❯ yarn build files/zh-tw/learn/common_questions/web_mechanics/what_is_a_web_server/index.md
yarn run v1.22.19
$ cross-env NODE_ENV=production ts-node build/cli.ts files/zh-tw/learn/common_questions/web_mechanics/what_is_a_web_server/index.md
(node:36300) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
CONTENT_ROOT: /Users/queengooborg/Developer/Gooborg/mdn-content/files
CONTENT_TRANSLATED_ROOT: /Users/queengooborg/Developer/Gooborg/mdn-translated-content/files
Time to gather all translations: 16.302s
Language does not exist: svelte
/Users/queengooborg/Developer/Gooborg/yari/client/build/zh-tw/docs/learn/common_questions/web_mechanics/what_is_a_web_server
Built 1 pages in 17.5 seconds, at a rate of 0.1 documents per second.
Peak heap memory usage: 300 MB
Total_Flaws_Count
broken_links 8
macros 1
✨ Done in 19.45s.
The time spent gathering all the translations is definitely quite high, I wonder what's causing the sudden change in build times, hmm...
from yari.
In v2.5.5 (the latest as of this comment) on a brand new package and folder made specifically for testing Yari, I found that the time spent went down significantly to ~4.3s:
❯ node node_modules/@mdn/yari/build/cli.js files/zh-tw/learn/common_questions/web_mechanics/what_is_a_web_server/index.md
(node:46939) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
CONTENT_ROOT: /Users/queengooborg/Developer/Gooborg/mdn-content/files
CONTENT_TRANSLATED_ROOT: /Users/queengooborg/Developer/Gooborg/mdn-translated-content/files
Time to gather all translations: 4.300s
Language does not exist: svelte
/Users/queengooborg/Developer/tmp-yari-test/node_modules/@mdn/yari/client/build/zh-tw/docs/learn/common_questions/web_mechanics/what_is_a_web_server
Built 1 pages in 5.2 seconds, at a rate of 0.2 documents per second.
Peak heap memory usage: 252 MB
Total_Flaws_Count
broken_links 8
macros 1
And in v1.36.4, I get around the same time.
When I was trying to dig into profiling and performance, I ran a profiler through Chrome's debug panel (within Yari, using the latest branch), and I found something interesting:
I don't see much of a reason that the front-matter
package would be causing such an issue... Maybe it's something to do with NodeJS wrapping CJS to ESM?
from yari.
Related Issues (20)
- Search fails when cookies are disabled HOT 1
- "In action" section of MDN web docs blank when cookies are disabled
- Visiting MDN pages throws a Javascript SecurityException when session storage is disabled
- Live sample not working in '2D collision detection‘
- Is it possible to show locale title instead of the last path string in `main menu of module` for macros? HOT 2
- Long words overflowing content box for recent contributions on mobile viewports
- Build system could be more helpful when reporting slug-folder naming discrepencies
- Only one image allowed in live example HOT 5
- Baseline component seems to show incorrect Baseline status or BCD is incorrect HOT 1
- DOMContentLoaded event is not fired
- Playground usability HOT 3
- Multiple errors/warnings in test
- MDN layout issue: tables too wide when viewport is 769px and 1200px HOT 6
- Consider adding an accessibility disclaimer to the Baseline badge HOT 5
- Play - Excessive time to execute examples HOT 2
- Change Breadcrumbs behavior in small sizes
- Ordering issue for filter functions in Formal syntax section HOT 2
- Examples flash in Safari HOT 1
- MDN intercepts Firefox's native `/` shortcut HOT 6
- Game Console Error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yari.