raggrep 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3704,6 +3704,7 @@ init_config2();
3704
3704
  import { glob } from "glob";
3705
3705
  import * as fs6 from "fs/promises";
3706
3706
  import * as path14 from "path";
3707
+ import * as os3 from "os";
3707
3708
 
3708
3709
  // src/modules/registry.ts
3709
3710
  class ModuleRegistryImpl {
@@ -4112,7 +4113,12 @@ function formatDuration(ms) {
4112
4113
  const remainingSeconds = seconds % 60;
4113
4114
  return `${minutes}m ${remainingSeconds.toFixed(1)}s`;
4114
4115
  }
4115
- var DEFAULT_CONCURRENCY = 4;
4116
+ function getOptimalConcurrency() {
4117
+ const cpuCount = os3.cpus().length;
4118
+ const optimal = Math.max(2, Math.min(16, Math.floor(cpuCount * 0.75)));
4119
+ return optimal;
4120
+ }
4121
+ var DEFAULT_CONCURRENCY = getOptimalConcurrency();
4116
4122
  async function indexDirectory(rootDir, options = {}) {
4117
4123
  const verbose = options.verbose ?? false;
4118
4124
  const quiet = options.quiet ?? false;
@@ -4844,4 +4850,4 @@ export {
4844
4850
  ConsoleLogger
4845
4851
  };
4846
4852
 
4847
- //# debugId=C1C754EB0A3147DB64756E2164756E21
4853
+ //# debugId=CD5077D1A96FC88964756E2164756E21