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

Extremely slow with 700KB file #258

Open
drjasonharrison opened this issue Apr 17, 2024 · 0 comments
Open

Extremely slow with 700KB file #258

drjasonharrison opened this issue Apr 17, 2024 · 0 comments

Comments

@drjasonharrison
Copy link

``It took me a while to figure out the cause of my pre-commit hooks getting "stuck" on the doctoc (v2.2.0) step but finally realized that doctoc appeared to be processing a 7000KB .md file that wasn't staged for the git commit. The file contained only three heading entries but the last 99% of the file was log lines from a multi hour run of a program.

Unfortunately, doctoc is still taking more than 25 minutes to process four .md files, because one was more than 700KB. Memory usage was also high at 750MB.

The command according to ps:

/home/jason/.cache/pre-commit/repold2ulagt/node_env-16.14.2/bin/node /home/jason/.cache/pre-commit/repold2ulagt/node_env-16.14.2/bin/doctoc file1.md file2.md file3.md file4.md

After deleting a bunch of lines in that file, it's now only 6000 lines (from 5x lines) and now 188KB. And doctoc updates the TOC with a few seconds.

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

No branches or pull requests

1 participant