Skip to content

Performance updates #17

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

Merged
merged 3 commits into from
May 28, 2025
Merged

Performance updates #17

merged 3 commits into from
May 28, 2025

Conversation

dermatz
Copy link
Collaborator

@dermatz dermatz commented May 28, 2025

This pull request introduces several optimizations and new features to the magento-log-viewer extension, focusing on performance improvements, better user experience, and enhanced functionality for handling log and report files. Key changes include caching mechanisms, improved file handling, and updates to badge counts and log entry processing.

Performance Improvements:

  • Pre-compilation of regular expressions for timestamps: Prevents repeated compilation on each call, improving efficiency. (src/helpers.ts)
  • Caching for JSON reports: Avoids redundant reading and parsing of JSON files by implementing a caching mechanism. (src/helpers.ts)
  • Optimized line counting with caching: Reduces time spent counting lines in large files and avoids repeated calculations for unchanged files. (src/helpers.ts)

Enhanced User Experience:

  • Improved badge updates with throttling and debouncing: Prevents frequent updates and implements efficient counting methods for log entries and report files. (src/helpers.ts) [1] [2]
  • Dialog for selecting log files when no path is provided: Adds a user-friendly selection dialog for navigating to log files or specific lines when the file path is missing. (src/helpers.ts)

Functional Enhancements:

  • New commands added: Introduced magento-log-viewer.openFile and magento-log-viewer.openFileAtLine commands to improve file navigation capabilities. (package.json)
  • Improved log entry counting: Counts actual log entries instead of lines, ensuring accurate representation of log data. (src/logViewer.ts) [1] [2]

@dermatz dermatz merged commit 2ee8c24 into main May 28, 2025
4 checks passed
@dermatz dermatz deleted the performance-updates branch May 28, 2025 21:49
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