`react-native start`需要很长时间

时间:2022-10-19 18:32:49

Working with react-native on Windows becomes more difficult with each passing day.

在Windows上使用react-native变得越来越困难。

At the beginning everything was working fine ("react-native": "^0.18.0-rc"). Then I upgrade react-native about four months later than I started. React-Native became runs more slowly. Even so it became slower, I continued to improve my project.

一开始一切都很好(“react-native”:“^ 0.18.0-rc”)。然后我比我开始后大约四个月升级react-native。 React-Native变得运行得更慢。即便如此,它变慢了,我继续改进我的项目。

Some day, I read that "React Native 0.22 ships with Hot Reloading!" Then I tried it out immediately. It didn't work stable on Windows. I tried recently. Unfortunately everything is the same.

有一天,我读到“React Native 0.22附带Hot Reloading!”然后我马上试了一下。它在Windows上运行不稳定。我最近试过了。不幸的是一切都是一样的。

I've updated React-Native to 0.27.0-rc2. The packager works extremely slow. Then I tried to init a fresh project and moved the project into the new initialized project. This process has reduced the packager working time to 169 seconds from 293 seconds. Then I tried to downgrade RN version to 0.26.2 stable. Everything seems the same.

我已将React-Native更新为0.27.0-rc2。包装工作速度极慢。然后我尝试初始化一个新项目并将项目移动到新的初始化项目中。此过程将打包工作时间从293秒减少到169秒。然后我尝试将RN版本降级到0.26.2稳定。一切似乎都一样。

Even finding dependencies phase takes 177 seconds. This is a real disaster for me.

即使找到依赖关系阶段也需要177秒。这对我来说真是一场灾难。

Is there any chance to make faster the React-Native packager on Windows?

有没有机会在Windows上加快React-Native包装器的速度?

After upgrading to 0.27.0-rc2: `react-native start`需要很长时间

升级到0.27.0-rc2后:

After fresh initialization: `react-native start`需要很长时间

新初始化后:

1 个解决方案

#1


0  

After hours, it reached an acceptable time. It may thanks to caching.

几小时后,它达到了可接受的时间。这可能要归功于缓存。

Packager time......: 87 seconds
find dependencies: 5 seconds

打包时间......:87秒找到依赖:5秒

#1


0  

After hours, it reached an acceptable time. It may thanks to caching.

几小时后,它达到了可接受的时间。这可能要归功于缓存。

Packager time......: 87 seconds
find dependencies: 5 seconds

打包时间......:87秒找到依赖:5秒