rspress icon indicating copy to clipboard operation
rspress copied to clipboard

[optimize]: Reduce virtual-site-data.mjs runtime module size

Open Timeless0911 opened this issue 1 year ago • 1 comments

What problem does this feature solve?

In huge scale doc site project, the virtual-site-data.mjs will be 100, 000+ lines, which may be 3M+.

This results in the startup time of the entry, thus even we enable lazy compilation, it still need 1s to load the entry.

We can do something to split this file.

Timeless0911 avatar May 20 '24 09:05 Timeless0911

The virtual-site-data seems unnecessary, as its purpose is only to achieve automated navigation bars. We should consider how to optimize the logic. In addition, it scanned and parsed all MD files once, which increased the build time to some extent.

shulaoda avatar Aug 06 '24 07:08 shulaoda