Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no copy serve for large sites(10Gb) #2662

Open
yiwc opened this issue Nov 3, 2021 · 4 comments · May be fixed by #3570
Open

no copy serve for large sites(10Gb) #2662

yiwc opened this issue Nov 3, 2021 · 4 comments · May be fixed by #3570

Comments

@yiwc
Copy link

yiwc commented Nov 3, 2021

Dear mkdocs team,

Thanks for your great work. May I know is there a way tomkdocs serve without copy files? My site is about 10Gb with 2000+files(pdfs), most of those are just for downloads and reading in chrome. Every time serve, I notice it will copy those files with endless time cost. I guess if we don't copy, it would be much faster. This servers only for local view, so there are no security issues without using copy.

Thanks

@yiwc
Copy link
Author

yiwc commented Nov 3, 2021

Screenshot 2021-11-03 at 4 44 05 PM

Thanks, here give a temporal solution

unexpectedpanda added a commit to unexpectedpanda/mkdocs that referenced this issue Feb 12, 2024
… file copy during serve by using junctions and symbolic links instead (mkdocs#2662)
@unexpectedpanda
Copy link

I've found this to be a large problem for locally hosting video files as well. Duplicating tens of gigabytes of video on the same relatively small SSD isn't really feasible. I'm not at the stage of development where I'm looking for a dedicated external host for these binaries either, so being able to bypass the copy on serve would be useful.

For my own purposes I've put together something that creates junctions on Windows (which bypasses permission issues), and symbolic links on Linux for specified folders. I'll submit my changes as a PR, but as I'm not up to speed on writing tests or completely familiar with the MKDocs structure, consider it as a way to continue the discussion.

@oprypin
Copy link
Contributor

oprypin commented Feb 12, 2024

You can check this implementation if it works well.

No idea when this feature will be released but here it is

@unexpectedpanda
Copy link

Can confirm this is working on Windows 10, thanks! This will meaningfully make a difference to my workflow.

The icing on the cake would be to be able to define other asset directories external to docs_dir that can be referenced by the web server. The use case: this lets me store my video library on a separate large disk drive or NAS, but keep my development on a smaller local SSD. Not 100% necessary as I can always symlink a drive folder or UNC path into the docs_dir, but certainly a nice-to-have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants