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

Next Minor Version: Performance and Reliability Improvements #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ImBIOS
Copy link
Owner

@ImBIOS ImBIOS commented Mar 21, 2025

Next Minor Version Features

This PR introduces several key improvements:

  1. Caching Mechanism:

    • Implemented a caching system to store GitHub repository data
    • Only fetches updated data instead of all repos on each run
    • Significant performance improvement for users/orgs with many repositories
  2. Performance Benchmarking:

    • Added benchmarking tools to measure performance improvements
    • Created performance baseline metrics
    • Documentation for benchmarking capabilities
  3. Code Improvements:

    • Refactored yearly commit calculator for better performance
    • Added efficient repository data processing
    • Integrated caching with GitHub data operations

These changes make the waka-readme-stats more reliable, faster, and efficient especially for users with large GitHub profiles. The caching system is especially beneficial for those with many repositories, as it will dramatically reduce API calls and processing time.

Implementation Details

  1. Added a new CacheManager class that manages cache operations
  2. Created benchmarking utilities for measuring performance
  3. Integrated caching with repository data processing
  4. Added a standalone benchmarking script

Next Steps for Test Coverage (To Be Implemented)

  • Add tests for CacheManager
  • Add tests for benchmarking utilities
  • Improve test coverage across the codebase
  • Create integration tests to verify performance improvements

Resolves #23

ImBIOS added 2 commits March 22, 2025 06:24

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Copy link

changeset-bot bot commented Mar 21, 2025

⚠️ No Changeset found

Latest commit: 16f3d66

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@@ -0,0 +1,123 @@
import time
from unittest.mock import patch

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'patch' is not used.

Copilot Autofix AI 10 days ago

To fix the problem, we need to remove the unused import statement. This will make the code cleaner and easier to maintain. Specifically, we will delete the line from unittest.mock import patch from the file sources/benchmarking_test.py.

Suggested changeset 1
sources/benchmarking_test.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/sources/benchmarking_test.py b/sources/benchmarking_test.py
--- a/sources/benchmarking_test.py
+++ b/sources/benchmarking_test.py
@@ -1,3 +1,2 @@
 import time
-from unittest.mock import patch
 
EOF
@@ -1,3 +1,2 @@
import time
from unittest.mock import patch

Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,132 @@
import json

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'json' is not used.

Copilot Autofix AI 10 days ago

To fix the problem, we need to remove the unused import statement for the json module. This will clean up the code and remove the unnecessary dependency. The change should be made in the file sources/manager_cache_test.py by deleting the line that imports the json module.

Suggested changeset 1
sources/manager_cache_test.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/sources/manager_cache_test.py b/sources/manager_cache_test.py
--- a/sources/manager_cache_test.py
+++ b/sources/manager_cache_test.py
@@ -1,2 +1 @@
-import json
 import os
EOF
@@ -1,2 +1 @@
import json
import os
Copilot is powered by AI and may make mistakes. Always verify output.
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.

None yet

1 participant