vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
67.81k stars 6.1k forks source link

The cold start time of 'vite3.2.0' is twice that of 'vite3.1.8' #10658

Closed mxp131011 closed 1 year ago

mxp131011 commented 1 year ago

Describe the bug

vite3.1.8 first ’vite dev’ only requires 25s, vite3.2.0-beta.1 first ’vite dev‘ requires 19s, vite3.2.0 first ’vite dev’ requires 13s

Reproduction

https://github.com/mxp131011/test

Steps to reproduce

Change the version numbers of 'vite' and '@vitejs/plugin-vue'


"devDependencies": {
        "@vitejs/plugin-vue": "3.1.2", //  3.2.0-beta.0  // 3.2.0
        "vite": "3.1.8" //  3.2.0-beta.1 // 3.2.0
}

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (4) x64 Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz
    Memory: 9.57 GB / 15.94 GB
  Binaries:
    Node: 18.10.0 - F:\IDE\nodejs\node.EXE
    npm: 8.19.2 - F:\IDE\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.525.0), Chromium (106.0.1370.52)
    Internet Explorer: 11.0.22621.1

Used Package Manager

pnpm

Logs

No response

Validations

patak-dev commented 1 year ago

I'm not able to reproduce on M1. Maybe a Windows-only issue? Could you update the description? It looks like the numbers are inverted. It would be helpful if you could trim the reproduction to the minimal form where you see the perf difference so it is easier for others to debug.

sapphi-red commented 1 year ago

I was able to reproduce on Windows. It seems it's happening from 3.2.0-beta.0.

mxp131011 commented 1 year ago

Has the problem not been fixed yet

haoqunjiang commented 1 year ago

Seems to be caused by https://github.com/vitejs/vite/pull/10314

sapphi-red commented 1 year ago

Closing as this seems to be fixed in main.

dep bundling time: 3.1.8: 1862ms + 1157ms 3.2.0: 6971ms + 1865ms 4.2.1: 10357ms + 2761ms main: 535ms + 394ms