MCPcopy Create free account
hub / github.com/chokcoco/iCSS / analyzeLayoutPerformance

Method analyzeLayoutPerformance

MCP/scripts/fetch-issues.js:978–997  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

976 }
977
978 analyzeLayoutPerformance(code) {
979 const notes = [];
980
981 // 检查 Flexbox 性能
982 if (code.includes('flex')) {
983 notes.push('Flexbox 在大量元素时可能影响性能');
984 }
985
986 // 检查 Grid 性能
987 if (code.includes('grid')) {
988 notes.push('Grid 布局在复杂嵌套时可能影响性能');
989 }
990
991 // 检查动态布局
992 if (code.includes('calc')) {
993 notes.push('calc() 在频繁计算时可能影响性能');
994 }
995
996 return notes.join('. ');
997 }
998
999 getLayoutBrowserSupport(code) {
1000 const support = {

Callers 1

analyzeCodePatternsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected