You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems rspack will call js side pitch loaderRunner even js loader doesn't implement pitch method which will cause extra tsfn call cost, so it would be better if rspack can skip call loaderRunner if no pitch is implemented
changed the title [-][Feature]: skip call js side pitch loader-runner if loader doesn't pitch[/-][+][Feature]: skip call js side pitch loader-runner if loader doesn't implement pitch[/+]on Apr 23, 2025
PR is welcome. Calculating whether a loader contains a pitching loader in rspack option initialization is hard. This requires rspack to create a loader resolver before that, however, currently rspack creates its loader resolver on the Rust side. Instead, we could calculate the result in the first call to a JS loader, if pitching loader is an undefined, then we can skip the following pitching execution. This result is shared between modules.
Activity
[-][Feature]: skip call js side pitch loader-runner if loader doesn't pitch[/-][+][Feature]: skip call js side pitch loader-runner if loader doesn't implement pitch[/+]h-a-n-a commentedon Apr 23, 2025
PR is welcome. Calculating whether a loader contains a pitching loader in rspack option initialization is hard. This requires rspack to create a loader resolver before that, however, currently rspack creates its loader resolver on the Rust side. Instead, we could calculate the result in the first call to a JS loader, if pitching loader is an
undefined
, then we can skip the following pitching execution. This result is shared between modules.