Skip to content

[Bug]: rsdoctor UI /webpack/loaders/overall sometimes just doesn't load for large bundles. loaders timeline also has trouble. #1521

@dgoldstein0

Description

@dgoldstein0

Version

System:
    OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz
    Memory: 27.27 GB / 61.80 GB
    Container: Yes
    Shell: 5.1.16 - /usr/bin/bash
  npmPackages:
    @rsdoctor/cli: ^1.3.12 => 1.3.16
    @rsdoctor/rspack-plugin: ^1.3.11 => 1.3.13

I'm using Chrome on Windows to view the rsdoctor report - version 144 right now.

Details

I have a very large codebase we're building with rspack. We've seen a lot of variance in our builds (which I now believe is largely due to the filesystem of the remote execution system we're running them on) and in trying to debug where the time was going I pulled out rsdoctor. rsdoctor's web ui seems rather flakey for us - sometimes I can get it to render data, and then sometimes it just won't or takes so long (>30s) that my impatience wins instead. I don't really understand it but I assume it's related to the sheer size of the bundles I'm feeding it - looks like my input is about 11500 files to bundle.

Tried to capture the experience in loom https://www.loom.com/share/5d378599bf31484f9efd3ec73808ae1a

$ du -h .rsdoctor/
55M .rsdoctor/loader
8.0K .rsdoctor/otherReports
20K .rsdoctor/errors
5.1M .rsdoctor/moduleGraph
205M .rsdoctor/moduleCodeMap
192M .rsdoctor/chunkGraph
8.0K .rsdoctor/envinfo
8.0K .rsdoctor/summary
92K .rsdoctor/packageGraph
8.0K .rsdoctor/plugin
8.0K .rsdoctor/resolver
12K .rsdoctor/configs
456M .rsdoctor/

Reproduce link

sorry, I don't have an easy repro I can share

Reproduce Steps

bundle some really large codebase with rspack and rsdoctor enabled - probably in the realm of 500kloc - with builtin:swc-loader & source-map-loader running on all inputs. (apologies, but I can't link to my codebase - it's my company's closed source website).

launch rsdoctor with yarn rsdoctor analyze --profile .rsdoctor/manifest.json --no-open --port 3000, navigate to localhost:3000 (port forwarded if running on a separate machine), enable storage for localhost in the browser if the page doesn't load. navigate around the rsdoctor ui, especially the loader timeline & analysis, and try to see if it'll load in a reasonable time; it probably won't, but seems inconsistent (sometimes it'll load in maybe 30s, other times it takes minutes or never loads)

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions