Giter Site home page Giter Site logo

Comments (6)

jerrykingxyz avatar jerrykingxyz commented on June 14, 2024

@bostondv Can you provide a performance trace file?

// https://web-infra-dev.github.io/rspack-dev-guide/profiling/intro.html#chrome
RSPACK_PROFILE=TRACE=layer=chrome npm run dev

// modify the file like example 1 and waiting for rebuild finish
...

// modify the file like example 2 and waiting for rebuild finish
...

// Ctrl + C and find .rspack-profile-${timestamp}/trace.json in the current working directory.

from rspack.

bostondv avatar bostondv commented on June 14, 2024

Thanks @jerrykingxyz

Here's the trace.json (160MB)

from rspack.

bostondv avatar bostondv commented on June 14, 2024

Thanks for pointing out the profiling guide btw. I uploaded the track to https://ui.perfetto.dev/ and can see that in example 1, the bulk of the time is spent in chunk splitting which doesn't happen in example 2 rebuild.

example 1:
Screenshot 2024-01-15 at 11 16 40 AM

example 2:
Screenshot 2024-01-15 at 11 16 54 AM

Any idea why one change causes different behaviour than the other?

from rspack.

jerrykingxyz avatar jerrykingxyz commented on June 14, 2024

It seems that example 1 is not using cache and re-splitting chunks, this behavior is not expected, it should only happen when modify imports/exports.
I will try to fix it in the next version of 0.5.x, you can try disable optimization.mergeDuplicateChunks in development mode to make split chunks faster.

from rspack.

bostondv avatar bostondv commented on June 14, 2024

Thank you @jerrykingxyz!

By the way, disabling optimization.mergeDuplicateChunks in development made a huge difference. Reduced rebuilds to about ~5.5s which is very helpful in the meantime.

from rspack.

jerrykingxyz avatar jerrykingxyz commented on June 14, 2024

Should been fixed by #5694

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.