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

Create cache to optimize. #430

Open
1 of 2 tasks
hanbings opened this issue Aug 1, 2024 · 0 comments
Open
1 of 2 tasks

Create cache to optimize. #430

hanbings opened this issue Aug 1, 2024 · 0 comments

Comments

@hanbings
Copy link
Collaborator

hanbings commented Aug 1, 2024

Performance can be significantly improved by caching some data:

  • This optimization aims to improve performance when traversing a file and need to access the file's Metadata multiple times. Wrap walkdir::DirEntry in a new type #436
  • Speed ​​up operations such as getting user and group names from uid and gid.

We should create a centralized cache object and then provide a corresponding interface for the entire program to obtain data.

@hanbings hanbings changed the title Cache the metadata Cache the metadata. Aug 1, 2024
@hanbings hanbings changed the title Cache the metadata. Cache the Metadata. Aug 1, 2024
@hanbings hanbings changed the title Cache the Metadata. Create cache to optimize. Aug 7, 2024
tavianator added a commit to tavianator/findutils that referenced this issue Aug 8, 2024
The new type wraps DirEntry when possible, but also lets us pass a valid
entry to matchers when walkdir returns a broken symlink error.  It also
implements a Metadata cache (part of uutils#430).
tavianator added a commit to tavianator/findutils that referenced this issue Aug 8, 2024
The new type wraps DirEntry when possible, but also lets us pass a valid
entry to matchers when walkdir returns a broken symlink error.  It also
implements a Metadata cache (part of uutils#430).
tavianator added a commit to tavianator/findutils that referenced this issue Aug 9, 2024
The new type wraps DirEntry when possible, but also lets us pass a valid
entry to matchers when walkdir returns a broken symlink error.  It also
implements a Metadata cache (part of uutils#430).
tavianator added a commit to tavianator/findutils that referenced this issue Aug 9, 2024
The new type wraps DirEntry when possible, but also lets us pass a valid
entry to matchers when walkdir returns a broken symlink error.  It also
implements a Metadata cache (part of uutils#430).
tavianator added a commit to tavianator/findutils that referenced this issue Aug 9, 2024
The new type wraps DirEntry when possible, but also lets us pass a valid
entry to matchers when walkdir returns a broken symlink error.  It also
implements a Metadata cache (part of uutils#430).
tavianator added a commit to tavianator/findutils that referenced this issue Aug 11, 2024
The new type wraps DirEntry when possible, but also lets us pass a valid
entry to matchers when walkdir returns a broken symlink error.  It also
implements a Metadata cache (part of uutils#430).
tavianator added a commit to tavianator/findutils that referenced this issue Aug 12, 2024
The new type wraps DirEntry when possible, but also lets us pass a valid
entry to matchers when walkdir returns a broken symlink error.  It also
implements a Metadata cache (part of uutils#430).
hanbings added a commit that referenced this issue Aug 14, 2024
* Add -follow support.

* tests/find: Serialize find_time()

find_time() relies on the working directory, but e.g.
delete_on_dot_dir() will temporarily change directories, causing
find_time() to fail when run in parallel.

* find: Don't use uutils::error::set_exit_code()

The global exit code can polute the results of other tests.

Link: uutils/coreutils#5777

* find: New WalkEntry wrapper

The new type wraps DirEntry when possible, but also lets us pass a valid
entry to matchers when walkdir returns a broken symlink error.  It also
implements a Metadata cache (part of #430).

* find: Implement -H, -L, -P flags

* find: Fix -follow -samefile

* find: Fix -follow -newer

* find: Implement -xtype

* find: Fix -delete error handling

---------

Co-authored-by: hanbings <hanbings@hanbings.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant