Skip to content

tsx is way slower since v4.21.1 #809

Description

@leia-uwu

Acknowledgements

  • I read the documentation and searched existing issues to avoid duplicates
  • I understand this is a bug tracker and anything other than a proven bug will be closed
  • I understand this is a free project and relies on community contributions
  • I read and understood the Contribution guide

Minimal reproduction URL

https://github.com/survev/survev/

Problem & expected behavior (under 200 words)

I recently noticed that tsx has been around 2 times slower on my project, and git bisected it to commit 1d7e528

It seems to be something related to the import loader so i can't really provide a "minimum" reproduction URL because its only noticeable on projects that imports large amounts of files

Steps to reproduce:

  • clone the project from the reproduction URL ( https://github.com/survev/survev/ )
  • Install dependencies with pnpm install
  • cd into server directory
  • run tsx src/gameServer.ts or pnpm dev:game script
  • wait for a log that has Game Process Manager | [INFO] Process {PID} created in {TIME}ms

Observed behavior:

Since commit 1d7e528 (and release v4.21.1) it will take way longer to create the game process

On my Arch Linux desktop system it went from around 800ms to almost 2 seconds:

Image

And on an M4 Macbook with MacOS it went from around 300ms to around 900ms

Tested with nodejs v24.16.0 on both systems

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work will speed up resolution and support the project

  • I'm willing to offer $10 for financial support

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions