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

Check the possibility of Persistent MLC index #37

Open
arjunsuresh opened this issue Jan 23, 2025 · 3 comments
Open

Check the possibility of Persistent MLC index #37

arjunsuresh opened this issue Jan 23, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@arjunsuresh
Copy link
Contributor

Currently the MLC indexes are recreated when we start an MLC command. It'll be good to do a persistent index to speed up the execution of multiple MLC commands in sequence.

@arjunsuresh arjunsuresh added the enhancement New feature or request label Jan 23, 2025
@Sid9993
Copy link
Contributor

Sid9993 commented Jan 25, 2025

I would like to provide some suggestions for addressing this issue:

Problem Statement:
If we keep the MLC indexes(index_script.json) persistent then it should also handle the situations when we make any kind of changes in the script's tags, paths etc. it should also get reflected in the already generated index_script.json.

Suggested Solutions

  1. Using Persistent MLC Index with Timestamp Validation:

Store a last-modified timestamp for each index in the index_script.json.
Before using the persistent index, validate if the stored timestamps match the actual file system timestamps.
If there's a mismatch, regenerate the index. If not, use the already generated index.
In this way, I believe that we could avoid regenerating every index and instead, we could modify only the changed index.

  1. Incremental Index Updates:

Instead of recreating the entire index, detect changes (additions, deletions, or modifications) in the directory by tracking the file changes from the system and only update the affected parts of the index_script.json.
This minimizes processing overhead while maintaining consistency.

@arjunsuresh
Copy link
Contributor Author

@Sid9993 These are good suggestions. I believe the suggested solution 1 is the way to go. Would you like to give a try?

@Sid9993
Copy link
Contributor

Sid9993 commented Feb 2, 2025

@Sid9993 These are good suggestions. I believe the suggested solution 1 is the way to go. Would you like to give a try?

Yeah, ofc. I would like to give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants