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

perf: prevent Bolt from rewriting files as often and add files icon #100

Closed
wants to merge 2 commits into from

Conversation

ali00209
Copy link

Changes

  • Reduced frequency of file rewrites in Bolt operations
  • Added new files icon to improve UI visibility
  • Optimized file handling performance.

Implementation Details

  1. File Content Caching

    • Added #fileCache Map to store file content and last modified timestamps
    • Prevents redundant file reads
    • Maintains memory-efficient file state tracking
  2. Smart Content Change Detection

    • Implemented content comparison before write operations
    • Only writes files when content has actually changed
    • Eliminates unnecessary disk I/O
  3. Debounced Write Operations

    • Introduced #pendingWrites Map for write operation queuing
    • Added debounce timer to collect multiple write requests
    • Prevents rapid successive writes to the same files
  4. Batch Writing System

    • Implemented batch processing of pending writes
    • Executes all queued write operations in a single batch
    • Optimizes system resources by reducing total I/O operations

Technical Benefits

  • Reduced disk I/O frequency
  • Improved system performance
  • Lower resource utilization
  • Better handling of concurrent file operations

Screenshots

image

@itsazerila
Copy link

@ali00209
thanks for all your efforts.

Copy link
Collaborator

@chrismahoney chrismahoney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there, I would like to review this but it looks like a code formatter got ahead of itself and re-arranged a bunch of code syntax leading to a lot of noise in the changes made. Could you revert those code style changes so I can easier look at the changes made? Cheers

@chrismahoney
Copy link
Collaborator

This also should not be an 'Approve Changes' approval to merge I just chose, that's my mistake as I've yet to look at it.

@ali00209 ali00209 closed this Nov 1, 2024
@ali00209 ali00209 deleted the new_bolt branch November 1, 2024 23:13
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.

3 participants