Skip to content

Conversation

@jbroma
Copy link
Member

@jbroma jbroma commented Sep 25, 2023

Summary

This PR introduces a performance improvement for HMR in the @callstack/repack package.

Changes:

  • Modified LoggerPlugin.ts to improve performance. Specifically, an update has been made to the stats.toJson method. By adding all: false we disable retrieving other stats that were being needlessly retrieved by default.

Performance Metrics:

HMR time:

Metric Before Change (ms) After Change (ms)
Min 482 433
Max 616 549
Mean 528.62 476.60
Standard Deviation 60.29 29.16

LoggerPlugin done hook time:

Metric Before Change (ms) After Change (ms)
Min 40 0.1
Max 146 1

@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2023

🦋 Changeset detected

Latest commit: b0ab7fe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@callstack/repack Patch
testerapp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@RafikiTiki RafikiTiki force-pushed the refactor/hmr-performance-logger-plugin branch from db15789 to ddac722 Compare October 9, 2023 16:26
@jbroma jbroma force-pushed the refactor/hmr-performance-logger-plugin branch from ddac722 to b0ab7fe Compare October 10, 2023 11:31
@jbroma jbroma merged commit e86db86 into main Oct 10, 2023
@jbroma jbroma deleted the refactor/hmr-performance-logger-plugin branch October 10, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants