.agents/skills/frontend-code-review/references/performance.md
Review performance only where there is realistic impact. Do not request memo, useMemo, useCallback, virtualization, or caching as style preferences.
Flag:
Prefer Promise.all for independent work and branch-local awaits for conditionally needed data.
Flag:
@langgenius/dify-ui.Use direct imports and next/dynamic where the user-visible path benefits.
Flag:
Use request-scoped deduplication such as React.cache() when repeated server reads in one request are the problem.
Flag:
Do not flag simple primitive expressions wrapped or not wrapped in useMemo; prefer no memo for simple work.
Require stable object/array/function identity only when:
Flag:
getBoundingClientRect, offset*, scrollTop).content-visibility.transition-all.For workflow React Flow components, keep this Dify-specific rule:
useNodes / useEdges.useStoreApi.web/app/components/workflow/nodes/[nodeName]/node.tsx must not depend on workflow stores that are absent in RAG Pipe template rendering.