title: What is the cause of the new Float32Array time consuming exception?
body: <pre><code>let arr = []
  
  for(let i = 0; i &lt; 11308608; i++){
  
  arr.push(Math.random() * 1000)
  
  }
  
  console.time('load')
  
  a = new Float32Array(arr)
  
  console.timeEnd('load')
  </code></pre>
  <p>Open a new blank page, open the console, and execute this code, typically in tens of milliseconds, no more than 100ms.</p>
  <p>However, it is commonly used in projects over 1500ms.</p>
  <p>The reason why I found this is that the project needs to load more 3D resources. When optimizing the performance, I found that the optimized effect in the static page demo was very good, while the effect was very poor when used in the project.</p>
  <p>Basically, it takes 10s in the demo, but more than 30s in the project.</p>
  <p>After a lot of hard work, we found this code in <code>three.module.js:40591</code>:</p>
  <p><code>const typedArray = new TYPED_ARRAYS[ attribute.type ]( attribute.array );</code></p>
  <p>This is a time consuming exception when writing to an array.</p>
  <p>After trying to remove the VUE, removing all dependencies and leaving only a blank page, the console execution of the above test code still does not take effect.</p>
  <p>In a build project, remove all JS files to avoid time-consuming exceptions.</p>
  <p>Executing this code on the React project will also result in a time-consuming exception.</p>
  <p>According to the preliminary judgment, it is webpack, but it cannot be solved yet.</p>