Skip to content

perf: optimize entire core codebase functions and tighten regression tests#17

Open
DevvGwardo wants to merge 9 commits into
MisterGuy420:mainfrom
DevvGwardo:perf/optimize-entire-codebase-20260302-191520
Open

perf: optimize entire core codebase functions and tighten regression tests#17
DevvGwardo wants to merge 9 commits into
MisterGuy420:mainfrom
DevvGwardo:perf/optimize-entire-codebase-20260302-191520

Conversation

@DevvGwardo

Copy link
Copy Markdown
Contributor

Summary

This PR applies a full optimization pass across Peppy core functions and hardens key unit tests.

What changed

Core runtime optimizations

  • peppy/cache.py

    • Improved cache robustness with stronger hashing and freshness behavior.
    • Better handling for cache reads/writes in hot paths.
  • peppy/indexer.py

    • Faster ignore/path filtering and improved indexing throughput behavior.
    • Better worker utilization strategy and metadata handling.
  • peppy/searcher.py

    • Added bounded symbol search flow with early stopping support.
    • Improved file-pattern/path matching behavior.
    • Improved grep execution path and context generation overhead.
  • peppy/parsers.py

    • Corrected symbol traversal/classification edge behavior to improve extraction quality.
  • peppy/interface.py

    • Reduced repeated work in symbol lookup/overview pathways.
    • Better propagation of search limits into lower-level search calls.
  • peppy/server.py

    • Improved search tool parameter flow and response behavior for optimized search execution.
  • pyproject.toml

    • Updated script/runtime wiring to align with optimized runtime entry flow.

Test hardening

  • tests/unit/test_parsers.py

    • Fixed weak/no-op assertions and replaced with meaningful checks.
  • tests/unit/test_searcher.py

    • Added/updated assertions for bounded symbol search behavior.
    • Added regression coverage for relative file path lookup behavior.

Why

  • Improve end-to-end performance for indexing and search-heavy usage.
  • Fix correctness edge cases discovered during review.
  • Raise confidence via stronger unit test assertions.

Notes

  • Changes are backward-compatible and focused on optimization/correctness.
  • This PR is designed to be mergeable independently from prior optimization PRs.

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.

1 participant