Hi Debiprasad Dash,
Welcome to the Microsoft Q&A Platform!
The performance degradation in your Next.js project during calls with Azure Communication Services (ACS) SDKs could stem from multiple potential causes.
Monitor heap usage with browser dev tools or Node.js profiling tools to detect memory leaks.
Ensure proper cleanup of ACS event listeners during component unmounting.
Rate-limit frequent API calls to avoid backend throttling.
Log API requests to detect duplicates or inefficiencies.
Use React Profiler to identify unnecessary re-renders.
Optimize components with React.memo
, useCallback
, or useMemo
.
Throttle or debounce state updates triggered by ACS events.
Monitor WebSocket connections to prevent excessive reconnections.
Verify ACS SDK configurations for efficient state polling.
Load ACS-specific libraries only in the browser to reduce SSR overhead.
if (typeof window !== "undefined") {
const { CallClient } = require('@azure/communication-calling');
}
Update ACS SDKs to the latest versions to leverage bug fixes and improvements.
Check the Azure SDK Known Issues documentation for compatibility guidance.
Use Azure Monitor Application Insights to analyze API latency and performance metrics.
Enable verbose ACS SDK logging for detailed diagnostics.
const callClient = new CallClient({ logging: true });
https://learn.microsoft.com/en-us/azure/communication-services/overview.
If the answer is helpful, please click ACCEPT ANSWER and kindly upvote it so that other people who faces similar issue may get benefitted from it.