# Extremely slow build times with yarn

**URL:** <https://devforum.zoom.us/t/extremely-slow-build-times-with-yarn/82159>\
**Category:** Web\
**Created:** [January 26, 2023, 11:42am UTC](https://devforum.zoom.us/t/extremely-slow-build-times-with-yarn/82159 "2023-01-26T11:42:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paddy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/paddy/32/44926_2.png) [@paddy](https://devforum.zoom.us/u/paddy)\
**Post date:** [January 26, 2023, 11:42am UTC](https://devforum.zoom.us/t/extremely-slow-build-times-with-yarn/82159/1 "2023-01-26T11:42:40Z")

</div>

Im trying to do a production build and since adding Zoom SDK it takes a very long time \> 25mins if im lucky.

Its a nextjs app and zoom is integrated into the component as follows:

```auto
  useEffect(() => {
    sessionStorage.setItem('fallbackUrl', state?.zoomMeetingDetails?.fallbackUrl)
    setState(items => ({...items, zoomMeeting:true}))
    if(!state.zoomMeetingDetails) return (window.location.href = state?.zoomMeetingDetails?.fallbackUrl)
    zoomMtg = require('@zoomus/websdk').ZoomMtg
    zoomMtg.setZoomJSLib('https://source.zoom.us/2.9.5/lib', '/av');
    zoomMtg.preLoadWasm()
    zoomMtg.prepareWebSDK()
    zoomMtg.i18n.load('en-US')
    zoomMtg.i18n.reload('en-US')
  }, [])

```

and the package.json is

```auto
    "@emotion/react": "^11.10.0",
    "@emotion/styled": "^11.10.0",
    "@mui/icons-material": "^5.8.4",
    "@mui/lab": "^5.0.0-alpha.102",
    "@mui/material": "^5.9.3",
    "@mui/x-date-pickers": "^5.0.0-beta.4",
    "@parse/react-ssr": "^0.0.1-alpha.18",
    "@zoomus/websdk": "^2.9.5",
    "i18next": "^21.9.1",
    "i18next-http-backend": "^2.1.1",
    "moment": "^2.29.4",
    "next": "^12.2.3",
    "parse": "^3.4.3",
    "qrcode.react": "^3.1.0",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-hook-form": "^7.34.0",
    "react-hot-toast": "^2.3.0",
    "react-i18next": "^11.18.5",
    "swiper": "^8.3.2"

```

any idea what is causing it ?

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [January 26, 2023, 9:36pm UTC](https://devforum.zoom.us/t/extremely-slow-build-times-with-yarn/82159/2 "2023-01-26T21:36:16Z")

</div>

If you import the webSDK package at the top of the file instead of dynamically within useEffect do you see a difference in build times?

Also, are you seeing performance differences when in development mode?

Here is an example app showing how you can import the WebSDK with react:

> <https://github.com/zoom/meetingsdk-react-sample/blob/780ac747573d7dd203a80257e29832c425f17146/src/App.js#L4>

I hope that helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [February 26, 2023, 7:36am UTC](https://devforum.zoom.us/t/extremely-slow-build-times-with-yarn/82159/3 "2023-02-26T07:36:31Z")

</div>

Closed on February 26, 2023, 7:36am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
