Skip to content

Conversation

zix99
Copy link
Owner

@zix99 zix99 commented May 31, 2025

By default, filepath.WalkDir gathers all files and sorts before outputing. On testing with a directory with over a million small files, this leads to a multi-second start lag.

This slightly forks and changes the WalkDir command to iterate on a directory. This removes sorting (CPU improvement), and speeds up the initial request significantly. (Negligible). For some reason this method is ever so slightly slower than filepath.WalkDir (few microseconds), but average use that won't be noticeable, and for large searches this will be a significant improvement.

Copy link

netlify bot commented May 31, 2025

Deploy Preview for raredocs ready!

Name Link
🔨 Latest commit 899158c
🔍 Latest deploy log https://app.netlify.com/projects/raredocs/deploys/683bb67c298a0b000808482b
😎 Deploy Preview https://deploy-preview-149--raredocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov-commenter
Copy link

codecov-commenter commented May 31, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 61.22449% with 19 lines in your changes missing coverage. Please review.

Project coverage is 93.28%. Comparing base (6330d98) to head (899158c).

Files with missing lines Patch % Lines
pkg/extractor/dirwalk/iterwalk/iterwalk.go 60.41% 16 Missing and 3 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
- Coverage   93.49%   93.28%   -0.22%     
==========================================
  Files         142      143       +1     
  Lines        7446     7494      +48     
==========================================
+ Hits         6962     6991      +29     
- Misses        363      379      +16     
- Partials      121      124       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zix99 zix99 merged commit 3c6b7e4 into master Jun 1, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants