Skip to content

Persistent Cache #1309

@yyx990803

Description

@yyx990803

#1207 (comment)

Vite's current biggest performance bottleneck is first page load with large amount of modules. This is mostly caused by congestion at the browser network layer, since every module results in a full HTTP GET request on fresh server start.

To improve this, we can dump the in memory transform cache to disk on server close, and "hydrate" the module graph on next server start (the hydration should only fill in the cache for files with still fresh mtimeMs). The cache can be dumped in one file so it should be relatively fast to deal with. This allows the server to directly send 304s even on a restart.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp4-importantViolate documented behavior or significantly improves performance (priority)performancePerformance related enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions