GithubHelp home page GithubHelp logo

[Bug]: Slow hot reload about rspack HOT 6 CLOSED

escaton avatar escaton commented on September 27, 2024
[Bug]: Slow hot reload

from rspack.

Comments (6)

hardfist avatar hardfist commented on September 27, 2024

thank you for your detailed report similar issue with #7490, it seems a performance bug of watchpack, can you help provide the input of the slow Function(the x and regex value) and help us find whether it's slow in x.replace(/\\/g, "/") or regexp.test

from rspack.

escaton avatar escaton commented on September 27, 2024

The regex is compiled once from the watchOptions.ignored that I provided, and x is each of the watched files (45k in my case).

The problem is not the performance of x => regex.test(x), but the fact that it is called at least 45k times (see filter() calls in watch method).

from rspack.

hardfist avatar hardfist commented on September 27, 2024

thanks that's really helpful, and we will consider reuse watch across different compilation

from rspack.

escaton avatar escaton commented on September 27, 2024

Maybe I can help with it? I thought about some early bailout in packages/rspack/src/Watching.ts

from rspack.

hardfist avatar hardfist commented on September 27, 2024

Maybe I can help with it? I thought about some early bailout in packages/rspack/src/Watching.ts

#7503 (comment) you can try whether this works for you?

from rspack.

escaton avatar escaton commented on September 27, 2024

Oh, this issue is actually a duplicate of #7490. That one was posted by my colleague :) Let's proceed in that issue.

from rspack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.