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

sdcv: Don't walk into "res/" subdirectories #1961

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 9, 2024

  1. sdcv: Don't walk into "res/" subdirectories

    When searching for .ifo files use the same optimization as we do in the
    koreader frontend in getIfosInDir(path) in readerdictionary.lua.
    
    Fortunately sdcv uses the for_each_file function exclusively to search
    for .ifo files, making the patch trivial.
    
    I have several dictionaries on my Kobo Aura One, some of which contain
    'res' subdirectories with many files. After a restart or cold boot, the
    first dictionary lookup would take around 45s, while subsequent lookups
    would only take merely around 0.5s. My theory for this massive
    difference is that after reboot, the file system cache is empty, and
    therefore the file system structure for all the resource directories
    must first be loaded from the flash, which seems to be quite slow.
    
    With the patched sdcv there is now no difference between the first and
    the following lookups anymore. In addition, the average lookup time on
    my device drops from 0.5s to about 0.3s.
    georgeto committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    4a5baa7 View commit details
    Browse the repository at this point in the history