Skip to content

rustdoc: Some sort of rendering optimization is needed for large source files #142060

Closed as not planned
@tgross35

Description

@tgross35

This is a link to a source page that is ~30k lines of code, with a 2.6 MB HTML file:

https://doc.rust-lang.org/src/core/stdarch/crates/core_arch/src/aarch64/neon/generated.rs.html

On my Firefox on Windows, loading that page hangs the entire browser (other tabs) and slows down the whole OS for almost a full minute. Why this isn't better contained to a single tab I have no idea, but it seems like there is room for improvement here.

Maybe source could be rendered as plain text without colors when they exceed a complexity limit?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions