guan404ming commented on PR #61111:
URL: https://github.com/apache/airflow/pull/61111#issuecomment-3804580768
## **Load Time Benchmark**
## Result
Metric | main (node-sql-parser) | replace-with-sqlparser-rs (sqlparser-ts)
-- | -- | --
Avg Page Load | 459.6ms | 463.9ms
Median Page Load | 446.3ms | 450.2ms
Min | 382.0ms | 359.1ms
Max | 549.0ms | 643.2ms
Avg DOM Content Loaded | 456.4ms | 460.3ms
Individual Values | 549, 439, 382, 390, 433, 438, 453, 519, 469, 524 | 443,
452, 368, 359, 406, 449, 480, 574, 643, 467
No measurable performance difference. Both branches are within noise margin
(~4ms difference in median)
---
## Config
* **Browser:** Playwright Chromium (Default)
* **Runs:** 10 (with 1 warmup run excluded)
* **Wait Condition:** `networkidle`
---
## **Playwright Script**
```javascript
async (page) => {
const url =
'http://localhost:28080/dags/long_log_dag/runs/manual__2026-01-27T09:58:47.311305+00:00/tasks/execute_query/rendered_templates';
const runs = 10;
const results = [];
// Warm up
await page.goto(url, { waitUntil: 'networkidle' });
for (let i = 0; i < runs; i++) {
await page.goto(url, { waitUntil: 'networkidle' });
const timing = await page.evaluate(() => {
const nav = performance.getEntriesByType('navigation')[0];
return {
pageLoad: nav.loadEventEnd - nav.startTime,
domContentLoaded: nav.domContentLoadedEventEnd - nav.startTime,
};
});
results.push(timing);
}
const avg = (arr) => (arr.reduce((a, b) => a + b, 0) /
arr.length).toFixed(1);
const median = (arr) => {
const s = [...arr].sort((a, b) => a - b);
const m = Math.floor(s.length / 2);
return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
};
const p = results.map(r => r.pageLoad);
const d = results.map(r => r.domContentLoaded);
return {
runs,
pageLoad: {
avg: avg(p),
median: median(p).toFixed(1),
min: Math.min(...p).toFixed(1),
max: Math.max(...p).toFixed(1),
values: p.map(v => v.toFixed(1))
},
domContentLoaded: {
avg: avg(d),
median: median(d).toFixed(1),
min: Math.min(...d).toFixed(1),
max: Math.max(...d).toFixed(1)
},
};
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]