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

Directory scanning performance improvements #14

Merged
merged 6 commits into from
Apr 10, 2022
Merged

Commits on Mar 29, 2022

  1. [tui] Improves directory entry sorting & scanning

    - Add: Adds `.tui.main.UNKNOWN` constant for `scan_dir_*` functions.
    - Change: Updates `.tui.main.sort_key_lexi()`.
      - Now accepts `os.DirEntry` or `pathlib.Path` instances instead of strings.
    - Change: Updates `.tui.main.scan_dir_entry()`.
      - Now accepts `os.DirEntry` or `pathlib.Path` instances instead of strings for directory entries.
      - Other minor performance optimizations.
    - Change: Significantly improves directory entry sorting and scanning performance.
      - Leverages `os.DirEntry`'s stat caching to eliminate system calls by `os.path.isfile()`.
    - Change: Updates docstrings.
    AnonymouX47 committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    9d177f6 View commit details
    Browse the repository at this point in the history
  2. [tui] Improves directory scanning

    - Change: Updates `.tui.main.scan_dir()`.
      - Adds *last_entry* and *sort_key* parameters for improved functionality.
      - Replaces `os.listdir()` with `os.scandir()` for significant performance improvements.
      - Now yeilds the entry typecode along with the item tuple.
      - Now yeilds all scanned entries, no matter the type to allow for better control within it's caller.
    - Change: Updates docstrings.
    AnonymouX47 committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    79e8495 View commit details
    Browse the repository at this point in the history
  3. [tui] Improves menu listing and grid scanning

    - Change: Updates `scan_dir_grid()` and `scan_dir_menu()` in `.tui.main`.
      - Both functions now utilize `.tui.main.scan_dir()`.
    - Change: Updates docstrings.
    AnonymouX47 committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    e41b472 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'main'

    AnonymouX47 committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    8926891 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2022

  1. [tui] Fixed grid scanning

    - Fix: Fixed `scan_dir_grid()` appending to the grid scan list after the grid has changed.
      - Occured when switching to an empty grid before the current grid scan is done.
      - `scan_dir_grid()` now uses an alias to the grid scan list, which is updated (with `.tui.main._grid_list`) only when changing grids.
    - Change: Renamed `.tui.main.grid_list` to `.tui.main._grid_list`.
    AnonymouX47 committed Apr 2, 2022
    Configuration menu
    Copy the full SHA
    359e890 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2022

  1. [tui] Changed entry group ordering

    - Change: Grouped directories before files.
    - Change: Removed unnecessary code.
    - Change: Updated docstrings and comments.
    AnonymouX47 committed Apr 9, 2022
    Configuration menu
    Copy the full SHA
    58e740e View commit details
    Browse the repository at this point in the history